# HG changeset patch # User unc0rr # Date 1235227420 0 # Node ID 6b6cf3389f92e95b97c5584289535f249af42c04 # Parent ae428043da321aef5a8c414b2ba18c5eb761130f Hedgehog drops a grave on "/newgrave" command. Patch by nemo diff -r ae428043da32 -r 6b6cf3389f92 hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Sat Feb 21 14:40:35 2009 +0000 +++ b/hedgewars/CCHandlers.inc Sat Feb 21 14:43:40 2009 +0000 @@ -390,6 +390,15 @@ end end; +procedure chNewGrave; +begin +if CheckNoTeamOrHH then exit; + +if not CurrentTeam^.ExtDriven then SendIPC('g'); + +AddGear(hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y), gtGrave, 0, _0, _0, 0) +end; + procedure doPut(putX, putY: LongInt; fromAI: boolean); begin if CheckNoTeamOrHH then exit; diff -r ae428043da32 -r 6b6cf3389f92 hedgewars/uChat.pas --- a/hedgewars/uChat.pas Sat Feb 21 14:40:35 2009 +0000 +++ b/hedgewars/uChat.pas Sat Feb 21 14:43:40 2009 +0000 @@ -142,6 +142,8 @@ ParseCommand('/taunt ' + char(i), true); exit end; + if (s = '/newgrave') then + ParseCommand('/newgrave', true); end else ParseCommand('/say ' + s, true); @@ -181,7 +183,7 @@ 63235 is RIGHT 63233 is DOWN *} - 63272, 63232, 36233, 36234, 36235: Key:=28; + 63272, 63232, 36233, 36234, 36235: Key:= 28; else if (Key < $80) then btw:= 1 else if (Key < $800) then btw:= 2 diff -r ae428043da32 -r 6b6cf3389f92 hedgewars/uConsole.pas --- a/hedgewars/uConsole.pas Sat Feb 21 14:40:35 2009 +0000 +++ b/hedgewars/uConsole.pas Sat Feb 21 14:43:40 2009 +0000 @@ -260,6 +260,7 @@ RegisterVariable('skip' , vtCommand, @chSkip , false); RegisterVariable('history' , vtCommand, @chHistory , true ); RegisterVariable('chat' , vtCommand, @chChat , true ); +RegisterVariable('newgrave', vtCommand, @chNewGrave , false); RegisterVariable('say' , vtCommand, @chSay , true ); RegisterVariable('ammomenu', vtCommand, @chAmmoMenu , false); RegisterVariable('+precise', vtCommand, @chPrecise_p , false); diff -r ae428043da32 -r 6b6cf3389f92 hedgewars/uIO.pas --- a/hedgewars/uIO.pas Sat Feb 21 14:40:35 2009 +0000 +++ b/hedgewars/uIO.pas Sat Feb 21 14:43:40 2009 +0000 @@ -260,6 +260,7 @@ end; 'w': ParseCommand('setweap ' + headcmd^.str[2], true); 't': ParseCommand('taunt ' + headcmd^.str[2], true); + 'g': ParseCommand('newgrave', true); '1'..'5': ParseCommand('timer ' + headcmd^.cmd, true); #128..char(128 + cMaxSlotIndex): ParseCommand('slot ' + char(byte(headcmd^.cmd) - 79), true) else