So because I'm a nice guy and someone called me a dick, cause I asked for 20 EUR for this code.
I will release my spawn protection anyways. So enjoy spawn protection!
This version avoids people taking advantage of using a temporary god mode by
restricting the usage of weapons while under spawn protection.
People can tell you are in Spawn Protection by the aura around you.
Also a note, to the jerkoff that said I was a bane on the internet.
Go F*** yourself, when you start releasing stuff maybe then you can have an opinion
about me. But I work as a developer, and I run a server to provide fun to people,
not because I have to but because I want to, and nothing in life is free;Especially on
the internet.
Now after this small rant ENJOY!
In the client
AI_Player.cpp
around Line number 3494 change from
toCode:if(CurLoadout.GameFlags & wiCharDataFull::GAMEFLAG_NearPostBox)
AfterCode:if((CurLoadout.GameFlags & wiCharDataFull::GAMEFLAG_NearPostBox) || (CurLoadout.GameFlags & wiCharDataFull::GAMEFLAG_isSpawnProtected))
Add thisCode:if(m_AuraType == AT_MORHINE && r3dGetTime() > m_MorhineShotTime) m_AuraType = AT_NONE;
UserProfile.hCode:if(CurLoadout.GameFlags && wiCharDataFull::GAMEFLAG_isSpawnProtected) m_AuraType = AT_SPAWNPROTECTION; if(!(CurLoadout.GameFlags && wiCharDataFull::GAMEFLAG_isSpawnProtected) && m_AuraType == AT_SPAWNPROTECTION) m_AuraType = AT_NONE;
after
add thisCode:GAMEFLAG_NearPostBox = (1 << 0),
That's all in the clientCode:GAMEFLAG_isSpawnProtected = (1 << 0 ),
Now for the server
//obj_ServerPlayer.cpp
//in
//afterCode:void obj_ServerPlayer::UpdateWorldFlags()
//addCode:loadout_->GameFlags = 0;
////ServerGameLogic.cppCode://Spawn Protection Code here if((((r3dGetTime() - startPlayTime_) <= 20.0f))) loadout_->GameFlags |= wiCharDataFull::GAMEFLAG_isSpawnProtected;
//in
//change line number 749 line about postboxes to thisCode: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 )
Code:if(((targetPlr->loadout_->GameFlags & wiCharDataFull::GAMEFLAG_NearPostBox)|| (targetPlr->loadout_->GameFlags & wiCharDataFull::GAMEFLAG_isSpawnProtected)) && !force_damage)


Reply With Quote![[Tutorial] Spawn Protection](http://ragezone.com/hyper728.png)


