summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 00c73a7)
raw | patch | inline | side by side (parent: 00c73a7)
author | FGSFDSFGS <derp.primus@gmail.com> | |
Tue, 28 Feb 2017 15:28:29 +0000 (18:28 +0300) | ||
committer | FGSFDSFGS <derp.primus@gmail.com> | |
Tue, 28 Feb 2017 15:28:29 +0000 (18:28 +0300) |
src/game/g_scriptprocs.pas | patch | blob | history | |
src/game/g_triggers.pas | patch | blob | history | |
src/game/g_weapons.pas | patch | blob | history |
index a4297041048e8c1a8c9c140798e033b7db56a5ef..262ba33c6526c91212b05d81fdb4fda30607c767 100644 (file)
if (ShotTarget > 0) and (ShotTarget < $FFFF) then
ShotTargetW := ShotTarget;
- lua_pushinteger(L, tr_SpawnShot(ShotType, wx, wy, dx, dy, not Silent, ShotTargetW, DWORD(-1)));
+ lua_pushinteger(L, tr_SpawnShot(ShotType, wx, wy, dx, dy, not Silent, ShotTargetW));
end;
function SP_Lua_SpawnEffect(L: PScriptContext): Integer; cdecl;
index 40de5b4d42199ffe0cca71090bec55d38848841a..ad03070e45eb91cb4ccaaaf80a01ddf2f6382c30 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
function tr_Push(ActivateUID: Integer; VX, VY: Integer; ResetVel: Boolean): Boolean;
procedure tr_MakeEffect(X, Y, VX, VY: Integer; T, ST, CR, CG, CB: Byte; Silent, Send: Boolean);
-function tr_SpawnShot(ShotType: Integer; wx, wy, dx, dy: Integer; ShotSound: Boolean; ShotTarget: Word; TID: DWORD): Integer;
+function tr_SpawnShot(ShotType: Integer; wx, wy, dx, dy: Integer; ShotSound: Boolean; ShotTarget: Word): Integer;
var
gTriggerClientID: Integer = 0;
end;
end;
-function tr_SpawnShot(ShotType: Integer; wx, wy, dx, dy: Integer; ShotSound: Boolean; ShotTarget: Word; TID: DWORD): Integer;
+function tr_SpawnShot(ShotType: Integer; wx, wy, dx, dy: Integer; ShotSound: Boolean; ShotTarget: Word): Integer;
var
snd: string;
Projectile: Boolean;
Anim.Free();
end;
Projectile := False;
- g_Weapon_Explode(wx, wy, 60, 0, TID);
+ g_Weapon_Explode(wx, wy, 60, 0);
snd := 'SOUND_WEAPON_EXPLODEROCKET';
end;
dx := dx + Random(Data.ShotAccuracy) - Random(Data.ShotAccuracy);
dy := dy + Random(Data.ShotAccuracy) - Random(Data.ShotAccuracy);
- tr_SpawnShot(Data.ShotType, wx, wy, dx, dy, Data.ShotSound, TargetUID, ID);
+ tr_SpawnShot(Data.ShotType, wx, wy, dx, dy, Data.ShotSound, TargetUID);
end
else
if (Data.ShotIntReload > 0) and (ShotReloadTime = 0) then
if ShotSightTime > 0 then
Exit;
+ // put this at the beginning so it doesn't trigger itself
+ TimeOut := Data.ShotWait + 1;
+
wx := Data.ShotPos.X;
wy := Data.ShotPos.Y;
pAngle := -DegToRad(Data.ShotAngle);
end;
end;
end;
-
- TimeOut := Data.ShotWait + 1;
end;
TRIGGER_EFFECT:
diff --git a/src/game/g_weapons.pas b/src/game/g_weapons.pas
index 24908271dc62734bc2f1d0fbeb019de387f9b67c..bcbf4c16352e7c35a3f173e0fddf781f51760538 100644 (file)
--- a/src/game/g_weapons.pas
+++ b/src/game/g_weapons.pas
procedure g_Weapon_shotgun(x, y, xd, yd: Integer; SpawnerUID: Word; Silent: Boolean = False);
procedure g_Weapon_dshotgun(x, y, xd, yd: Integer; SpawnerUID: Word; Silent: Boolean = False);
-function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word; IgnoreTrigger: Integer = -1): Boolean;
+function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word): Boolean;
procedure g_Weapon_BFG9000(X, Y: Integer; SpawnerUID: Word);
procedure g_Weapon_Update();
procedure g_Weapon_Draw();
end;
end;
-function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word; IgnoreTrigger: Integer = -1): Boolean;
+function g_Weapon_Explode(X, Y: Integer; rad: Integer; SpawnerUID: Word): Boolean;
var
i, h, r, dx, dy, m, mm: Integer;
_angle: SmallInt;
begin
Result := False;
- // don't let turret explosions use the turret
- g_Triggers_PressC(X, Y, rad, SpawnerUID, ACTIVATE_SHOT, IgnoreTrigger);
+ g_Triggers_PressC(X, Y, rad, SpawnerUID, ACTIVATE_SHOT);
r := rad*rad;