[C++] Stop collision with arguments [++ bonus ]

08/07/2016 02:49 VegaS ♆#1
A*collision*or*crash*is an event in which two or more bodies exert forces on each other for a relatively short time. Although the most common colloquial use of the word "collision" refers to incidents in which two or more objects collide, the scientific use of the word "collision" implies nothing about the magnitude of the force.

Some examples of physical interactions that scientists would consider collisions:

An insect touches its antenna to the leaf of a plant. The antenna is said to collide with leaf.
A cat walks delicately through the grass. Each contact that its paws make with the ground is a collision. Each brush of its fur against a blade of grass is a collision.

[Only registered and activated users can see links. Click Here To Register...]

[File: src/Client/Source/GameLib/ActorInstanceCollisionDetection.cpp]

//1.) Search:
Code:
#include "../eterLib/GrpMath.h"
//2.) Add bellow:
Code:
#include "../UserInterface/PythonBackground.h"
#include "../UserInterface/Locale_inc.h"
//3.) Search:
Code:
BOOL CActorInstance::TestActorCollision(CActorInstance & rVictim)
{
//4.) Add bellow:
Code:
#ifdef ENABLE_STOP_COLISSION_GLOBAL
/*********************************************************************
* date		: 2016.02.16
* function	: Stop Colission
* developer	: VegaS
* skype		: sacadatt.amazon
* description : Checks if the victim is one of the examples below you can easily configure. If the victim was found 
				success as vnum site / breed ve you could go through it no longer block.
*/	
/************
* The first value is the minimum value and the second value is the maximum value of pet vnum (mob_proto) - change 34051 with your max vnum of pet */	
	int pListPet[2] = {34001, 34051};	
/************
* You can add whatever you like vnum of npc or monster (mob_proto) */
	int pListGlobal[] = {9001, 9002, 9003, 9004, 9005, 9006, 20011, 20091, 20092, 20093, 20094, 20095, 30000};
/************
* You can add what mapname you want for enable this stop collission global like pet / npc */	
	const char* strMapListGlobal[] = {"metin2_map_a1", "metin2_map_a3", "metin2_map_b1", "metin2_map_b3", "metin2_map_c1", "metin2_map_c3", 
									"season2/metin2_map_skipia_dungeon_01", "season2/metin2_map_skipia_dungeon_02", "metin2_map_duel"};	
/************
* Location name of the map where the event takes place ox */		
	const char* strMapEventOx = "season1/metin2_map_oxevent";								
	
	
	std::string stringName = CPythonBackground::Instance().GetWarpMapName();
	
	for (int i = 0; i < _countof(strMapListGlobal); i++)
	{
#ifdef ENABLE_STOP_COLLISION_PLAYER_OX
		if (strMapEventOx == stringName) // Check if u are place in map ox
		{	
			if (0 <= rVictim.GetRace() && rVictim.GetRace() <= 7) // Check if the victim through which pass over a player (change 7 with 8 if u have wolfman)
				return FALSE;	// Stop collission for player --> You can go through players now successfully without lock yourself		
		}
#endif		
		if (strMapListGlobal[i] == stringName) // Check if you are in one of the maps listed in the global list
		{
			for (int i = 0; i < _countof(pListGlobal); i++)
			{
				if (rVictim.GetRace() == pListGlobal[i] || pListPet[0] <= rVictim.GetRace() && rVictim.GetRace() <= pListPet[1]) // Verify that the victim is npc vnum listed above, or if a pet.
					return FALSE;	// Stop collission for global vnum like a pet or npc							
			}
		}	
	}	
#endif
[File: src/Client/Source/UserInterface/Locale_inc.h]

//1.) Search:
Code:
#define ENABLE_COSTUME_SYSTEM
//2.) Add bellow:
Code:
#ifndef ENABLE_STOP_COLISSION_GLOBAL
	#define ENABLE_STOP_COLISSION_GLOBAL
	#define ENABLE_STOP_COLLISION_PLAYER_OX
#endif
08/07/2016 07:38 KilleRzZ™#2
Very cool ^^
08/07/2016 11:15 redryan#3
Its organized yes, but why you posted with at 8hours at m2dev, 3 hours after a guy that also made the same?

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
08/07/2016 13:35 lollo_9_1#4
Quote:
Originally Posted by redryan View Post
Its organized yes, but why you posted with at 8hours at m2dev, 3 hours after a guy that also made the same?
Some people said the one from Alucardo is took from Great's OffShop code.
About the rest, it's clearly advertisement.
08/07/2016 14:29 redryan#5
Quote:
Originally Posted by lollo_9_1 View Post
Some people said the one from Alucardo is took from Great's OffShop code.
About the rest, it's clearly advertisement.
Dindt knew that.

Theres a clear pattern when a new thing appears on the net, the OP makes a topic about it, with all of his "Developer VegaS" spammed in the code.

Something to take into consideration.
08/07/2016 16:54 VegaS ♆#6
Quote:
Originally Posted by redryan View Post
Dindt knew that.

Theres a clear pattern when a new thing appears on the net, the OP makes a topic about it, with all of his "Developer VegaS" spammed in the code.

Something to take into consideration.
I do not understand what you mean, because Google Translate does not help very much.

So I made this abundantly clear after I saw a guy that copied Collision according stop to shop.

These functions had already made long long time ago.

I do not understand what you mean that I copied from him or what? Haha nice joke.
He would need to be taken to be the man responsible, not me.

PS: Before that there is a guy who already sell this thing m2dev with 10euro.

I do not see what is wrong? So is the world hater.
I posted something for free, I also asked for money for shit, can other owner paid a lot of money to do that.

So stop with off-topic, thanks.
08/20/2016 15:48 VegaS ♆#7
#(Fix about check maplist