Permalink
Browse files

Consider RC Baron kills as a lame kill

Fixes #406
  • Loading branch information...
RussellLVP committed Oct 30, 2016
1 parent d6f29c1 commit 664e8736cf8e8744c37d65b4b67567706b77bd38
Showing with 16 additions and 8 deletions.
  1. +16 −8 pawn/Resources/Callbacks/OnPlayer/OnPlayerDeath.pwn
@@ -258,17 +258,25 @@ public OnPlayerDeath(playerid, killerid, reason) {
}
// Lame kill
if (killerid != Player::InvalidId && (reason == 28 /* UZI */ || reason == 29 /* MP5 */ ||
reason == 32 /* TEC-9 */ || VehicleModel(GetVehicleModel(GetPlayerVehicleID(killerid)))->isHelicopter() == true)) {
if (GetPlayerState(killerid) != PLAYER_STATE_DRIVER || g_VirtualWorld[killerid] != 0 || IsPlayerInMinigame(killerid))
return 0;
new const bool: isLameKill =
killerid != Player::InvalidId &&
IsPlayerInMainWorld(killerid) &&
GetPlayerState(killerid) == PLAYER_STATE_DRIVER &&
(
reason == 28 /* UZI */ ||
reason == 29 /* MP5 */ ||
reason == 32 /* TEC-9 */ ||
GetVehicleModel(GetPlayerVehicleID(killerid)) == 464 /* RC Baron */ ||
VehicleModel(GetVehicleModel(GetPlayerVehicleID(killerid)))->isHelicopter()
);
if (isLameKill) {
new Float:distanceBetweenPlayers = GetDistanceBetweenPlayers(playerid, killerid);
#if Feature::DisableKilltime == 0
#if Feature::DisableKilltime == 0
if (PlayerInfo[killerid][PlayerStatus] != STATUS_CHASE && !sKillTime && distanceBetweenPlayers < 100.0)
#else
#else
if (PlayerInfo[killerid][PlayerStatus] != STATUS_CHASE && distanceBetweenPlayers < 100.0)
#endif
#endif
return OnPlayerLameKill(playerid, killerid);
}

0 comments on commit 664e873

Please sign in to comment.