forked from Mirrors/openclonk
Change (int)0 to nil where deprecated
parent
511e3bbb36
commit
8e18a3fc96
|
@ -80,7 +80,7 @@ global func FxIntIntroStart(object target, proplist effect)
|
|||
|
||||
effect.Dialog = effect.Sister->SetDialogue("Sister");
|
||||
effect.Rock = effect.Sister->CreateContents(Rock);
|
||||
effect.Rock->SetObjectLayer(0);
|
||||
effect.Rock->SetObjectLayer(nil);
|
||||
effect.Players = [];
|
||||
}
|
||||
|
||||
|
|
|
@ -166,10 +166,10 @@ func Attack_8()
|
|||
npc.ActMap = Clonk.ActMap;
|
||||
npc->SetAction("Walk");
|
||||
}
|
||||
npc_newton->SetCommand("MoveTo", 0, 422, 342);
|
||||
npc_lara->SetCommand("MoveTo", 0, 455, 358);
|
||||
npc_lisa->SetCommand("MoveTo", 0, 474, 358);
|
||||
npc_woody->SetCommand("MoveTo", 0, 493, 358);
|
||||
npc_newton->SetCommand("MoveTo", nil, 422, 342);
|
||||
npc_lara->SetCommand("MoveTo", nil, 455, 358);
|
||||
npc_lisa->SetCommand("MoveTo", nil, 474, 358);
|
||||
npc_woody->SetCommand("MoveTo", nil, 493, 358);
|
||||
return ScheduleNext(150);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ private func Flying() {
|
|||
xdir *= 10;
|
||||
ydir *= 10;
|
||||
while(GBackSemiSolid(0, ydir)) ydir-=1;
|
||||
SetCommand("MoveTo", 0, GetX()+xdir, GetY()+ydir);
|
||||
SetCommand("MoveTo", nil, GetX()+xdir, GetY()+ydir);
|
||||
if(Random(10)==0 && attracted_to)
|
||||
SetCommand("MoveTo", attracted_to);
|
||||
}
|
||||
|
@ -90,9 +90,9 @@ public func Initialize()
|
|||
{
|
||||
SetAction("Fly");
|
||||
|
||||
SetGraphics("", GetID(), 1, 1, 0, GFX_BLIT_Additive);
|
||||
SetGraphics("", GetID(), 1, 1, nil, GFX_BLIT_Additive);
|
||||
SetClrModulation(RGBa(200,255,100,50),1);
|
||||
SetGraphics("", GetID(), 2, 1, 0, GFX_BLIT_Additive);
|
||||
SetGraphics("", GetID(), 2, 1, nil, GFX_BLIT_Additive);
|
||||
SetClrModulation(RGBa(200,255,0,255),2);
|
||||
|
||||
SetObjDrawTransform(300, 0, 0, 0, 300, 0, 2);
|
||||
|
|
|
@ -9,8 +9,8 @@ func Initialize() {
|
|||
func Hit() {
|
||||
var dmg = FIREBOMB_DAMAGE;
|
||||
|
||||
BlastObjects(GetX(), GetY(), dmg/2, 0, GetOwner() + 1);
|
||||
BlastObjects(GetX(), GetY(), dmg/2, 0, GetOwner() + 1);
|
||||
BlastObjects(GetX(), GetY(), dmg/2, nil, GetOwner() + 1);
|
||||
BlastObjects(GetX(), GetY(), dmg/2, nil, GetOwner() + 1);
|
||||
|
||||
var blast = {
|
||||
R = 255,
|
||||
|
|
|
@ -417,7 +417,7 @@ private func DoInk()
|
|||
};
|
||||
CreateParticle("SmokeThick", 0, 0, PV_Random(-40, 40), PV_Random(-40, 40), PV_Random(36, 100), particles, 64);
|
||||
// Make squid invisible for some time. Also inverse behavior during invisibility.
|
||||
AddEffect("Invisibility", this, 1, 2, this, 0, particles);
|
||||
AddEffect("Invisibility", this, 1, 2, this, nil, particles);
|
||||
// Drain Clonks' breath a bit faster when in ink.
|
||||
AddEffect("IntInkBlob", nil, 1, 5, nil, GetID(), GetX(), GetY());
|
||||
}
|
||||
|
|
|
@ -332,7 +332,7 @@ func UpdateBackwardsSpeed()
|
|||
{
|
||||
if(GetComDir() != GetDirection() && lAnim.backwards != 1 && lAnim.backwardsSpeed != nil)
|
||||
{
|
||||
AddEffect("IntWalkBack", this, 1, 0, this, 0, lAnim.backwardsSpeed);
|
||||
AddEffect("IntWalkBack", this, 1, 0, this, nil, lAnim.backwardsSpeed);
|
||||
lAnim.backwards = 1;
|
||||
}
|
||||
if( (GetComDir() == GetDirection() && lAnim.backwards == 1) || lAnim.backwardsSpeed == nil)
|
||||
|
@ -1311,7 +1311,7 @@ public func ControlThrow(object target, int x, int y)
|
|||
else SetDir(DIR_Left);
|
||||
//SetAction("Throw");
|
||||
this->~SetHandAction(1); // Set hands ocupied
|
||||
AddEffect("IntThrow", this, 1, 1, this, 0, target, throwAngle);
|
||||
AddEffect("IntThrow", this, 1, 1, this, nil, target, throwAngle);
|
||||
return true;
|
||||
}
|
||||
// attached
|
||||
|
|
|
@ -94,7 +94,7 @@ func Open()
|
|||
func UpdateDesc(data, int player, int ID, int subwindowID, object target)
|
||||
{
|
||||
var update = { Text = entries[subwindowID][0] };
|
||||
GuiUpdate(update, ID, 1, 0);
|
||||
GuiUpdate(update, ID, 1, nil);
|
||||
}
|
||||
|
||||
func OnClick(data, int player, int ID, int subwindowID, object target)
|
||||
|
@ -102,4 +102,4 @@ func OnClick(data, int player, int ID, int subwindowID, object target)
|
|||
target->Call(data[2], data[0], data[3]);
|
||||
if (!permanent)
|
||||
GuiClose(ID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ public func ControlUseStart(object clonk, int iX, int iY)
|
|||
swing_anim = clonk->PlayAnimation(hand, CLONK_ANIM_SLOT_Arms, Anim_Linear(0, 0, clonk->GetAnimationLength(hand), SwingTime, ANIM_Loop), Anim_Const(1000));
|
||||
|
||||
//The timed effect for when the axe actually hits the tree
|
||||
AddEffect("IntAxe", clonk, 1, 1, this, 0, tree);
|
||||
AddEffect("IntAxe", clonk, 1, 1, this, nil, tree);
|
||||
return true;
|
||||
}
|
||||
if(! tree->IsStanding())
|
||||
|
@ -114,7 +114,7 @@ public func ControlUseStart(object clonk, int iX, int iY)
|
|||
clonk->SetTurnForced(clonk->GetDir());
|
||||
|
||||
//The timed effect for when the axe actually hits the tree
|
||||
AddEffect("IntSplit", clonk, 1, 1, this, 0, tree);
|
||||
AddEffect("IntSplit", clonk, 1, 1, this, nil, tree);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ func CheckStrike(iTime)
|
|||
// don't hit objects twice
|
||||
if(!GetEffect(effect_name, obj))
|
||||
{
|
||||
AddEffect(effect_name, obj, 1, 60 /* arbitrary */, nil, 0);
|
||||
AddEffect(effect_name, obj, 1, 60 /* arbitrary */);
|
||||
|
||||
if(GetEffect(axe_name, obj))
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ func CheckStrike(iTime)
|
|||
}
|
||||
else
|
||||
{
|
||||
AddEffect(axe_name, obj, 1, 40, nil, 0);
|
||||
AddEffect(axe_name, obj, 1, 40);
|
||||
}
|
||||
|
||||
// Reduce damage by shield
|
||||
|
|
|
@ -206,7 +206,7 @@ func CheckStrike(iTime)
|
|||
// don't hit objects twice
|
||||
if(!GetEffect(effect_name, obj))
|
||||
{
|
||||
AddEffect(effect_name, obj, 1, Sword_Standard_StrikingLength, nil, 0);
|
||||
AddEffect(effect_name, obj, 1, Sword_Standard_StrikingLength);
|
||||
|
||||
if(GetEffect(sword_name, obj))
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ func CheckStrike(iTime)
|
|||
else
|
||||
{
|
||||
//Log("first hit overall");
|
||||
AddEffect(sword_name, obj, 1, 40, nil, 0);
|
||||
AddEffect(sword_name, obj, 1, 40);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -348,7 +348,7 @@ public func ApplySet(set)
|
|||
ReplaceAction(replace[0], replace[1]);
|
||||
|
||||
if(set["WalkSpeed"] != nil)
|
||||
AddEffect("IntWalkSlow", this, 1, 0, this, 0, set["WalkSpeed"]);
|
||||
AddEffect("IntWalkSlow", this, 1, 0, this, nil, set["WalkSpeed"]);
|
||||
|
||||
if(set["WalkBack"] != nil)
|
||||
SetBackwardsSpeed(set["WalkBack"]);
|
||||
|
|
|
@ -360,7 +360,7 @@ func ApplyShieldFactor(pFrom, pTo, damage)
|
|||
|
||||
func StartWeaponHitCheckEffect(pClonk, iLength, iInterval)
|
||||
{
|
||||
AddEffect("IntWeaponCharge", pClonk, 10, iInterval, this, 0, iLength);
|
||||
AddEffect("IntWeaponCharge", pClonk, 10, iInterval, this, nil, iLength);
|
||||
}
|
||||
|
||||
func StopWeaponHitCheckEffect(pClonk)
|
||||
|
|
|
@ -39,7 +39,7 @@ public func MoveTo(int x, int y, int r)
|
|||
{
|
||||
if (GetEffect("MoveTo", this))
|
||||
RemoveEffect("MoveTo", this);
|
||||
AddEffect("MoveTo", this, 1, 1, this, 0, x, y, r);
|
||||
AddEffect("MoveTo", this, 1, 1, this, nil, x, y, r);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ func Init(object bush)
|
|||
// actually grow
|
||||
SetObjDrawTransform();
|
||||
var steps = 1000 / max_grow_time;
|
||||
AddEffect("VirtGrow", this, 1, 1, this, 0, Max(1, steps));
|
||||
AddEffect("VirtGrow", this, 1, 1, this, nil, Max(1, steps));
|
||||
|
||||
// add two leaves
|
||||
AddLeaves(false);
|
||||
|
|
|
@ -354,7 +354,7 @@ global func Buy (id idBuyObj, int iForPlr, int iPayPlr, object pFromVendor, bool
|
|||
// not a vendor?
|
||||
if (!pFromVendor->~IsVendor())
|
||||
return nil;
|
||||
return pFromVendor->DoBuy(idBuyObj, iForPlr, iPayPlr, 0, 0, fShowErrors);
|
||||
return pFromVendor->DoBuy(idBuyObj, iForPlr, iPayPlr, nil, 0, fShowErrors);
|
||||
}
|
||||
|
||||
// Sells an object. Returns true if it could be sold.
|
||||
|
|
Loading…
Reference in New Issue