shooting and invincibility
shooting and invincibility
Hey, so for a shooting server, if someone is spawned and still considered "invincible", shots can still kill them. Is there any way to fix this?
-Z
-Z
z-man: you know this code great. exactly what i thought.
so something like this (gWinZone.cpp in void gDeathZoneHack::OnEnter):
i tried to compile it, but it gave me errors with gWinZone.cpp on a different line(?):
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
here is what i find at those lines:
but these lines were already there? i dont get it
EDIT: actually, those lines are just deprecated (some one is lazy) and i removed mine and it worked. tell me what im doing wrong.
so something like this (gWinZone.cpp in void gDeathZoneHack::OnEnter):
Code: Select all
else if ( target->Player != Vulnerable() ) //If player is invincible
{
//Don't kill ivincible players
return;
}
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
tron/gWinZone.cpp warning: deprecated conversion from string constant to ‘char*’
here is what i find at those lines:
Code: Select all
pWinString = "$player_win_self_destruct";
pFreeString = "$player_free_self_destruct";
score = score_self_destruct;
EDIT: actually, those lines are just deprecated (some one is lazy) and i removed mine and it worked. tell me what im doing wrong.
ok, i got it to work.
add these lines:
to gWinZone.cpp in
right after
add these lines:
Code: Select all
else if (!target->Vulnerable()) //Cycle is invulnerable
{
//Don't kill invulnerable cycles
return;
}
Code: Select all
void gDeathZoneHack::OnEnter( gCycle * target, REAL time )
Code: Select all
{
if (!dynamicCreation_)
{
target->Player()->AddScore(score_deathzone, tOutput(), "$player_lose_suicide");
target->Kill();
}