chore: disable killcams if attacker is a bot
All checks were successful
lint / Lint GSC files (push) Successful in 28s
All checks were successful
lint / Lint GSC files (push) Successful in 28s
This commit is contained in:
@@ -2,6 +2,9 @@ main()
|
||||
{
|
||||
replacefunc( maps\mp\_utility::getlastlivingplayer, ::getlastlivingplayer_stub );
|
||||
replacefunc( maps\mp\gametypes\common_sd_sr::ononeleftevent, ::ononeleftevent_stub );
|
||||
|
||||
// gitea#5 workaround
|
||||
replacefunc( maps\mp\gametypes\_killcam::killcamvalid, ::killcamvalid_stub );
|
||||
}
|
||||
|
||||
getlastlivingplayer_stub( team )
|
||||
@@ -36,3 +39,12 @@ ononeleftevent_stub( team )
|
||||
|
||||
last_player thread maps\mp\gametypes\common_sd_sr::givelastonteamwarning();
|
||||
}
|
||||
|
||||
killcamvalid_stub( victim, attacker, dokillcam )
|
||||
{
|
||||
return dokillcam && level.killcam &&
|
||||
!( isdefined( victim.cancelkillcam ) && victim.cancelkillcam ) &&
|
||||
game[ "state" ] == "playing" && !victim maps\mp\_utility::isusingremote() &&
|
||||
!level.showingfinalkillcam &&
|
||||
!isai( victim ) && !isai( attacker );
|
||||
}
|
||||
|
Reference in New Issue
Block a user