Objects: Added possible exception to KillLogs

and removed Width and Height DefCore entries for goals and rules
stable-5.1
Maikel de Vries 2010-12-11 12:30:51 +01:00
parent fbec8430aa
commit f4011aa5d7
9 changed files with 16 additions and 31 deletions

View File

@ -2,6 +2,4 @@
id=Goal_KingOfTheHill
Version=4,10,0,0
Category=C4D_StaticBack|C4D_Goal
Width=1
Height=1
Picture=0,0,64,64

View File

@ -2,6 +2,4 @@
id=Goal_LastManStanding
Version=4,10,0,0
Category=C4D_StaticBack|C4D_Goal
Width=1
Height=1
Picture=0,0,128,128

View File

@ -2,6 +2,4 @@
id=Goal_Melee
Version=4,10,0,0
Category=C4D_StaticBack|C4D_Goal
Width=1
Height=1
Picture=0,0,128,128

View File

@ -2,6 +2,4 @@
id=Goal_Parkour
Version=4,10,0,0
Category=C4D_StaticBack|C4D_Goal
Width=1
Height=1
Picture=0,0,128,128

View File

@ -2,6 +2,4 @@
id=Goal_Script
Version=4,10,0,0
Category=C4D_StaticBack|C4D_Goal
Width=1
Height=1
Picture=0,0,128,128

View File

@ -2,7 +2,4 @@
id=Rule_NeedEnergy
Version=4,10,0,0
Category=C4D_StaticBack|C4D_Rule
Width=1
Height=1
Value=1
Picture=0,0,64,64

View File

@ -2,6 +2,4 @@
id=Rule_KillLogs
Version=4,10,0,0
Category=C4D_StaticBack|C4D_Rule
Width=1
Height=1
Picture=0,0,64,64

View File

@ -2,8 +2,9 @@
func Initialize()
{
// only one at a time
if(ObjectCount(Find_ID(GetID())) > 1) return RemoveObject();
// Only one at a time.
if (ObjectCount(Find_ID(GetID())) > 1)
return RemoveObject();
}
public func Activate(int plr)
@ -14,20 +15,21 @@ public func Activate(int plr)
func OnClonkDeath(object clonk, int killed_by)
{
var plr=clonk->GetOwner();
if(plr == NO_OWNER) return;
if(!clonk) return;
var plr = clonk->GetOwner();
// Only log for existing players and clonks.
if (plr == NO_OWNER || !GetPlayerName(plr) || !clonk)
return;
// assert there are three StringTbl entries for each
var which_one=Random(3)+1;
// Assert there are three StringTbl entries for each.
var which_one = Random(3) + 1;
if(!GetPlayerName(killed_by))
return Log(Translate(Format("KilledByGaya%d", which_one)),GetTaggedPlayerName(plr), clonk.Prototype->GetName());
if(plr == killed_by)
return Log(Translate(Format("Selfkill%d", which_one)),GetTaggedPlayerName(plr), clonk.Prototype->GetName());
if(!Hostile(plr,killed_by))
return Log(Translate(Format("Teamkill%d", which_one)),GetTaggedPlayerName(plr), clonk.Prototype->GetName(), GetTaggedPlayerName(killed_by));
Log(Translate(Format("KilledByPlayer%d", which_one)),GetTaggedPlayerName(plr), clonk.Prototype->GetName(), GetTaggedPlayerName(killed_by));
if (!GetPlayerName(killed_by))
return Log(Translate(Format("KilledByGaya%d", which_one)), GetTaggedPlayerName(plr), clonk.Prototype->GetName());
if (plr == killed_by)
return Log(Translate(Format("Selfkill%d", which_one)), GetTaggedPlayerName(plr), clonk.Prototype->GetName());
if (!Hostile(plr,killed_by))
return Log(Translate(Format("Teamkill%d", which_one)), GetTaggedPlayerName(plr), clonk.Prototype->GetName(), GetTaggedPlayerName(killed_by));
Log(Translate(Format("KilledByPlayer%d", which_one)), GetTaggedPlayerName(plr), clonk.Prototype->GetName(), GetTaggedPlayerName(killed_by));
}
local Name = "$Name$";

View File

@ -2,6 +2,4 @@
id=Rule_Restart
Version=4,10,0,0
Category=C4D_StaticBack|C4D_Rule
Width=1
Height=1
Picture=0,0,64,64