- Joined
- Mar 31, 2013
- Messages
- 140
- Reaction score
- 94
First, the credits are going to iKasu and D3VCOR3
P.S: In InvassionMMO source already have this code, i only changed the code from a != to a ==, for in the following map players don't receive damage
- Open up warz_server.sln and search for
-
PHP:
bool ServerGameLogic::ApplyDamageToPlayer - You will see a code like that:
-
PHP:
bool ServerGameLogic::ApplyDamageToPlayer(GameObject* fromObj, obj_ServerPlayer* targetPlr, const r3dPoint3D& dmgPos, float damage, int bodyBone, int bodyPart, bool force_damage, STORE_CATEGORIES damageSource, int airState ) { r3d_assert(fromObj); r3d_assert(targetPlr); if(targetPlr->loadout_->Alive == 0) return false; // can't damage players in safe zones (postbox now act like that) if(((targetPlr->loadout_->GameFlags & wiCharDataFull::GAMEFLAG_NearPostBox) || (targetPlr->loadout_->GameFlags & wiCharDataFull::GAMEFLAG_SpawnProtection)) && !force_damage) return false; - After that "if" add this code
PHP:
if(targetPlr->loadout_->GameMapId == GBGameInfo::MAPID_WZ_Colorado) return false;
P.S: In InvassionMMO source already have this code, i only changed the code from a != to a ==, for in the following map players don't receive damage

