mirror of
https://github.com/etlegacy/etlegacy-lua-scripts.git
synced 2024-11-22 12:31:20 +00:00
Cleanup
This commit is contained in:
parent
26db675071
commit
5f51d9258b
1 changed files with 14 additions and 4 deletions
|
@ -24,6 +24,14 @@ local GODLIKE = 25
|
||||||
local WICKED_SICK = 30
|
local WICKED_SICK = 30
|
||||||
local REAL_POTTER = 35
|
local REAL_POTTER = 35
|
||||||
|
|
||||||
|
-- local SPREE = 1
|
||||||
|
-- local RAMPAGE = 2
|
||||||
|
-- local DOMINATION = 3
|
||||||
|
-- local UNSTOPPABLE = 5
|
||||||
|
-- local GODLIKE = 5
|
||||||
|
-- local WICKED_SICK = 6
|
||||||
|
-- local REAL_POTTER = 7
|
||||||
|
|
||||||
local SPREE_ANNOUNCEMENTS = {
|
local SPREE_ANNOUNCEMENTS = {
|
||||||
[SPREE] = {
|
[SPREE] = {
|
||||||
sound = "/sound/misc/killing-spree.wav",
|
sound = "/sound/misc/killing-spree.wav",
|
||||||
|
@ -74,8 +82,12 @@ end
|
||||||
function et_ClientBegin(clientNumber)
|
function et_ClientBegin(clientNumber)
|
||||||
local guid = getGuid(clientNumber)
|
local guid = getGuid(clientNumber)
|
||||||
|
|
||||||
|
local spree = killingSprees[guid]
|
||||||
|
|
||||||
|
if not spree then
|
||||||
killingSprees[guid] = 0
|
killingSprees[guid] = 0
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function announceSpree(clientNumber, guid)
|
function announceSpree(clientNumber, guid)
|
||||||
local spree = killingSprees[guid]
|
local spree = killingSprees[guid]
|
||||||
|
@ -101,13 +113,11 @@ function et_Obituary(target, attacker, meansOfDeath)
|
||||||
killingSprees[targetGuid] = 0
|
killingSprees[targetGuid] = 0
|
||||||
|
|
||||||
if suicide or teamkill or killerIsNotPlayer then
|
if suicide or teamkill or killerIsNotPlayer then
|
||||||
et.G_Print("suicide or teamkill or killerIsNotPlayer\n")
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local attackerGuid = getGuid(attacker)
|
local attackerGuid = getGuid(attacker)
|
||||||
killingSprees[attackerGuid] = killingSprees[attackerGuid] + 1
|
killingSprees[attackerGuid] = killingSprees[attackerGuid] + 1
|
||||||
|
|
||||||
et.G_Print("target " .. targetGuid .. " killed by " .. attackerGuid .. "\n")
|
announceSpree(attacker, attackerGuid)
|
||||||
et.G_Print("target spree " .. killingSprees[targetGuid] .. "\nattacker spree " .. killingSprees[attackerGuid] .. "\n")
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue