index 9afef5d07f739b05a05d2c2791d62d9f94c34414..b8165887c5aba2f975d77f5cfbba6cce3aa06451 100644 (file)
--- a/src/game/g_triggers.pas
+++ b/src/game/g_triggers.pas
uses
SysUtils, Variants, Classes,
uses
SysUtils, Variants, Classes,
- MAPDEF, e_graphics, g_basic, g_sound,
+ MAPDEF, g_basic, g_sound,
xdynrec, hashtable, exoma;
type
xdynrec, hashtable, exoma;
type
uses
Math,
uses
Math,
- g_player, g_map, g_panel, g_gfx, g_game, g_textures,
+ g_player, g_map, g_panel, g_gfx, g_game,
g_console, g_monsters, g_items, g_phys, g_weapons,
g_console, g_monsters, g_items, g_phys, g_weapons,
- wadreader, g_main, e_log, g_language, e_res,
+ wadreader, e_log, g_language, e_res,
g_options, g_net, g_netmsg, utils, xparser, xstreams;
const
g_options, g_net, g_netmsg, utils, xparser, xstreams;
const
@@ -664,11 +664,8 @@ function tr_SpawnShot (ShotType: Integer; wx, wy, dx, dy: Integer; ShotSound: Bo
var
snd: string;
Projectile: Boolean;
var
snd: string;
Projectile: Boolean;
- TextureID: DWORD;
- Anim: TAnimation;
begin
result := -1;
begin
result := -1;
- TextureID := DWORD(-1);
snd := 'SOUND_WEAPON_FIREROCKET';
Projectile := true;
snd := 'SOUND_WEAPON_FIREROCKET';
Projectile := true;
TRIGGER_SHOT_EXPL:
begin
TRIGGER_SHOT_EXPL:
begin
- if g_Frames_Get(TextureID, 'FRAMES_EXPLODE_ROCKET') then
- begin
- Anim := TAnimation.Create(TextureID, False, 6);
- Anim.Blending := False;
- g_GFX_OnceAnim(wx-64, wy-64, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_EXPLODE_ROCKET, wx - 64, wy - 64);
Projectile := False;
g_Weapon_Explode(wx, wy, 60, 0);
snd := 'SOUND_WEAPON_EXPLODEROCKET';
Projectile := False;
g_Weapon_Explode(wx, wy, 60, 0);
snd := 'SOUND_WEAPON_EXPLODEROCKET';
TRIGGER_SHOT_BFGEXPL:
begin
TRIGGER_SHOT_BFGEXPL:
begin
- if g_Frames_Get(TextureID, 'FRAMES_EXPLODE_BFG') then
- begin
- Anim := TAnimation.Create(TextureID, False, 6);
- Anim.Blending := False;
- g_GFX_OnceAnim(wx-64, wy-64, Anim);
- Anim.Free();
- end;
+ g_GFX_QueueEffect(R_GFX_EXPLODE_BFG, wx - 64, wy - 64);
Projectile := False;
g_Weapon_BFG9000(wx, wy, 0);
snd := 'SOUND_WEAPON_EXPLODEBFG';
Projectile := False;
g_Weapon_BFG9000(wx, wy, 0);
snd := 'SOUND_WEAPON_EXPLODEBFG';
procedure tr_MakeEffect (X, Y, VX, VY: Integer; T, ST, CR, CG, CB: Byte; Silent, Send: Boolean);
procedure tr_MakeEffect (X, Y, VX, VY: Integer; T, ST, CR, CG, CB: Byte; Silent, Send: Boolean);
-var
- FramesID: DWORD;
- Anim: TAnimation;
begin
if T = TRIGGER_EFFECT_PARTICLE then
begin
begin
if T = TRIGGER_EFFECT_PARTICLE then
begin
TRIGGER_EFFECT_DLIQUID: g_GFX_SimpleWater(X, Y, 1, VX, VY, 5, CR, CG, CB);
TRIGGER_EFFECT_BLOOD: g_GFX_Blood(X, Y, 1, VX, VY, 0, 0, CR, CG, CB);
TRIGGER_EFFECT_SPARK: g_GFX_Spark(X, Y, 1, GetAngle2(VX, VY), 0, 0);
TRIGGER_EFFECT_DLIQUID: g_GFX_SimpleWater(X, Y, 1, VX, VY, 5, CR, CG, CB);
TRIGGER_EFFECT_BLOOD: g_GFX_Blood(X, Y, 1, VX, VY, 0, 0, CR, CG, CB);
TRIGGER_EFFECT_SPARK: g_GFX_Spark(X, Y, 1, GetAngle2(VX, VY), 0, 0);
- TRIGGER_EFFECT_BUBBLE: g_GFX_Bubbles(X, Y, 1, 0, 0);
+ TRIGGER_EFFECT_BUBBLE:
+ begin
+ g_GFX_Bubbles(X, Y, 1, 0, 0);
+ if not Silent then if Random(2) = 0
+ then g_Sound_PlayExAt('SOUND_GAME_BUBBLE1', X, Y)
+ else g_Sound_PlayExAt('SOUND_GAME_BUBBLE2', X, Y);
+ end;
end;
end;
end;
end;
begin
case ST of
EFFECT_TELEPORT: begin
begin
case ST of
EFFECT_TELEPORT: begin
- if g_Frames_Get(FramesID, 'FRAMES_TELEPORT') then
- begin
- Anim := TAnimation.Create(FramesID, False, 3);
- if not Silent then g_Sound_PlayExAt('SOUND_GAME_TELEPORT', X, Y);
- g_GFX_OnceAnim(X-32, Y-32, Anim);
- Anim.Free();
- end;
+ if not Silent then g_Sound_PlayExAt('SOUND_GAME_TELEPORT', X, Y);
+ g_GFX_QueueEffect(R_GFX_TELEPORT_FAST, X - 32, Y - 32);
if Send and g_Game_IsServer and g_Game_IsNet then MH_SEND_Effect(X, Y, Byte(not Silent), NET_GFX_TELE);
end;
EFFECT_RESPAWN: begin
if Send and g_Game_IsServer and g_Game_IsNet then MH_SEND_Effect(X, Y, Byte(not Silent), NET_GFX_TELE);
end;
EFFECT_RESPAWN: begin
- if g_Frames_Get(FramesID, 'FRAMES_ITEM_RESPAWN') then
- begin
- Anim := TAnimation.Create(FramesID, False, 4);
- if not Silent then g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', X, Y);
- g_GFX_OnceAnim(X-16, Y-16, Anim);
- Anim.Free();
- end;
+ if not Silent then g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', X, Y);
+ g_GFX_QueueEffect(R_GFX_ITEM_RESPAWN, X - 16, Y - 16);
if Send and g_Game_IsServer and g_Game_IsNet then MH_SEND_Effect(X-16, Y-16, Byte(not Silent), NET_GFX_RESPAWN);
end;
EFFECT_FIRE: begin
if Send and g_Game_IsServer and g_Game_IsNet then MH_SEND_Effect(X-16, Y-16, Byte(not Silent), NET_GFX_RESPAWN);
end;
EFFECT_FIRE: begin
- if g_Frames_Get(FramesID, 'FRAMES_FIRE') then
- begin
- Anim := TAnimation.Create(FramesID, False, 4);
- if not Silent then g_Sound_PlayExAt('SOUND_FIRE', X, Y);
- g_GFX_OnceAnim(X-32, Y-128, Anim);
- Anim.Free();
- end;
+ if not Silent then g_Sound_PlayExAt('SOUND_FIRE', X, Y);
+ g_GFX_QueueEffect(R_GFX_FIRE, X - 32, Y - 128);
if Send and g_Game_IsServer and g_Game_IsNet then MH_SEND_Effect(X-32, Y-128, Byte(not Silent), NET_GFX_FIRE);
end;
end;
if Send and g_Game_IsServer and g_Game_IsNet then MH_SEND_Effect(X-32, Y-128, Byte(not Silent), NET_GFX_FIRE);
end;
end;
iid: LongWord;
coolDown: Boolean;
pAngle: Real;
iid: LongWord;
coolDown: Boolean;
pAngle: Real;
- FramesID: DWORD;
- Anim: TAnimation;
UIDType: Byte;
TargetUID: Word;
it: PItem;
UIDType: Byte;
TargetUID: Word;
it: PItem;
case tgcEffect of
EFFECT_TELEPORT: begin
case tgcEffect of
EFFECT_TELEPORT: begin
- if g_Frames_Get(FramesID, 'FRAMES_TELEPORT') then
- begin
- Anim := TAnimation.Create(FramesID, False, 3);
- g_Sound_PlayExAt('SOUND_GAME_TELEPORT', tgcTX, tgcTY);
- g_GFX_OnceAnim(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-32,
- mon.Obj.Y+mon.Obj.Rect.Y+(mon.Obj.Rect.Height div 2)-32, Anim);
- Anim.Free();
- end;
+ g_Sound_PlayExAt('SOUND_GAME_TELEPORT', tgcTX, tgcTY);
+ g_GFX_QueueEffect(
+ R_GFX_TELEPORT_FAST,
+ mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-32,
+ mon.Obj.Y+mon.Obj.Rect.Y+(mon.Obj.Rect.Height div 2)-32
+ );
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-32,
mon.Obj.Y+mon.Obj.Rect.Y+(mon.Obj.Rect.Height div 2)-32, 1,
NET_GFX_TELE);
end;
EFFECT_RESPAWN: begin
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-32,
mon.Obj.Y+mon.Obj.Rect.Y+(mon.Obj.Rect.Height div 2)-32, 1,
NET_GFX_TELE);
end;
EFFECT_RESPAWN: begin
- if g_Frames_Get(FramesID, 'FRAMES_ITEM_RESPAWN') then
- begin
- Anim := TAnimation.Create(FramesID, False, 4);
- g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', tgcTX, tgcTY);
- g_GFX_OnceAnim(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-16,
- mon.Obj.Y+mon.Obj.Rect.Y+(mon.Obj.Rect.Height div 2)-16, Anim);
- Anim.Free();
- end;
+ g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', tgcTX, tgcTY);
+ g_GFX_QueueEffect(
+ R_GFX_ITEM_RESPAWN,
+ mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-16,
+ mon.Obj.Y+mon.Obj.Rect.Y+(mon.Obj.Rect.Height div 2)-16
+ );
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-16,
mon.Obj.Y+mon.Obj.Rect.Y+(mon.Obj.Rect.Height div 2)-16, 1,
NET_GFX_RESPAWN);
end;
EFFECT_FIRE: begin
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-16,
mon.Obj.Y+mon.Obj.Rect.Y+(mon.Obj.Rect.Height div 2)-16, 1,
NET_GFX_RESPAWN);
end;
EFFECT_FIRE: begin
- if g_Frames_Get(FramesID, 'FRAMES_FIRE') then
- begin
- Anim := TAnimation.Create(FramesID, False, 4);
- g_Sound_PlayExAt('SOUND_FIRE', tgcTX, tgcTY);
- g_GFX_OnceAnim(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-32,
- mon.Obj.Y+mon.Obj.Rect.Y+mon.Obj.Rect.Height-128, Anim);
- Anim.Free();
- end;
+ g_Sound_PlayExAt('SOUND_FIRE', tgcTX, tgcTY);
+ g_GFX_QueueEffect(
+ R_GFX_FIRE,
+ mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-32,
+ mon.Obj.Y+mon.Obj.Rect.Y+mon.Obj.Rect.Height-128
+ );
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-32,
mon.Obj.Y+mon.Obj.Rect.Y+mon.Obj.Rect.Height-128, 1,
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(mon.Obj.X+mon.Obj.Rect.X+(mon.Obj.Rect.Width div 2)-32,
mon.Obj.Y+mon.Obj.Rect.Y+mon.Obj.Rect.Height-128, 1,
case tgcEffect of
EFFECT_TELEPORT: begin
it := g_Items_ByIdx(iid);
case tgcEffect of
EFFECT_TELEPORT: begin
it := g_Items_ByIdx(iid);
- if g_Frames_Get(FramesID, 'FRAMES_TELEPORT') then
- begin
- Anim := TAnimation.Create(FramesID, False, 3);
- g_Sound_PlayExAt('SOUND_GAME_TELEPORT', tgcTX, tgcTY);
- g_GFX_OnceAnim(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-32,
- it.Obj.Y+it.Obj.Rect.Y+(it.Obj.Rect.Height div 2)-32, Anim);
- Anim.Free();
- end;
+ g_Sound_PlayExAt('SOUND_GAME_TELEPORT', tgcTX, tgcTY);
+ g_GFX_QueueEffect(
+ R_GFX_TELEPORT_FAST,
+ it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-32,
+ it.Obj.Y+it.Obj.Rect.Y+(it.Obj.Rect.Height div 2)-32
+ );
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-32,
it.Obj.Y+it.Obj.Rect.Y+(it.Obj.Rect.Height div 2)-32, 1,
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-32,
it.Obj.Y+it.Obj.Rect.Y+(it.Obj.Rect.Height div 2)-32, 1,
end;
EFFECT_RESPAWN: begin
it := g_Items_ByIdx(iid);
end;
EFFECT_RESPAWN: begin
it := g_Items_ByIdx(iid);
- if g_Frames_Get(FramesID, 'FRAMES_ITEM_RESPAWN') then
- begin
- Anim := TAnimation.Create(FramesID, False, 4);
- g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', tgcTX, tgcTY);
- g_GFX_OnceAnim(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-16,
- it.Obj.Y+it.Obj.Rect.Y+(it.Obj.Rect.Height div 2)-16, Anim);
- Anim.Free();
- end;
+ g_Sound_PlayExAt('SOUND_ITEM_RESPAWNITEM', tgcTX, tgcTY);
+ g_GFX_QueueEffect(
+ R_GFX_ITEM_RESPAWN,
+ it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-16,
+ it.Obj.Y+it.Obj.Rect.Y+(it.Obj.Rect.Height div 2)-16
+ );
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-16,
it.Obj.Y+it.Obj.Rect.Y+(it.Obj.Rect.Height div 2)-16, 1,
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-16,
it.Obj.Y+it.Obj.Rect.Y+(it.Obj.Rect.Height div 2)-16, 1,
end;
EFFECT_FIRE: begin
it := g_Items_ByIdx(iid);
end;
EFFECT_FIRE: begin
it := g_Items_ByIdx(iid);
- if g_Frames_Get(FramesID, 'FRAMES_FIRE') then
- begin
- Anim := TAnimation.Create(FramesID, False, 4);
- g_Sound_PlayExAt('SOUND_FIRE', tgcTX, tgcTY);
- g_GFX_OnceAnim(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-32,
- it.Obj.Y+it.Obj.Rect.Y+it.Obj.Rect.Height-128, Anim);
- Anim.Free();
- end;
+ g_Sound_PlayExAt('SOUND_FIRE', tgcTX, tgcTY);
+ g_GFX_QueueEffect(
+ R_GFX_FIRE,
+ it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-32,
+ it.Obj.Y+it.Obj.Rect.Y+it.Obj.Rect.Height-128
+ );
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-32,
it.Obj.Y+it.Obj.Rect.Y+it.Obj.Rect.Height-128, 1,
if g_Game_IsServer and g_Game_IsNet then
MH_SEND_Effect(it.Obj.X+it.Obj.Rect.X+(it.Obj.Rect.Width div 2)-32,
it.Obj.Y+it.Obj.Rect.Y+it.Obj.Rect.Height-128, 1,
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
- Inc(gTeamStat[TEAM_RED].Goals, tgcScoreCount); // Red Scores
+ Inc(gTeamStat[TEAM_RED].Score, tgcScoreCount); // Red Scores
if tgcScoreCon then
begin
if tgcScoreCon then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
- Dec(gTeamStat[TEAM_RED].Goals, tgcScoreCount); // Red Fouls
+ Dec(gTeamStat[TEAM_RED].Score, tgcScoreCount); // Red Fouls
if tgcScoreCon then
begin
if tgcScoreCon then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
- Inc(gTeamStat[TEAM_BLUE].Goals, tgcScoreCount); // Blue Scores
+ Inc(gTeamStat[TEAM_BLUE].Score, tgcScoreCount); // Blue Scores
if tgcScoreCon then
begin
if tgcScoreCon then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
if ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE))
or ((tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
- Dec(gTeamStat[TEAM_BLUE].Goals, tgcScoreCount); // Blue Fouls
+ Dec(gTeamStat[TEAM_BLUE].Score, tgcScoreCount); // Blue Fouls
if tgcScoreCon then
begin
if tgcScoreCon then
begin
begin
if (tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then
begin
begin
if (tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then
begin
- Inc(gTeamStat[TEAM_RED].Goals, tgcScoreCount); // Red Scores
+ Inc(gTeamStat[TEAM_RED].Score, tgcScoreCount); // Red Scores
if tgcScoreCon then
begin
if tgcScoreCon then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then
begin
- Dec(gTeamStat[TEAM_RED].Goals, tgcScoreCount); // Red Fouls
+ Dec(gTeamStat[TEAM_RED].Score, tgcScoreCount); // Red Fouls
if tgcScoreCon then
begin
if tgcScoreCon then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_ADD) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then
begin
- Inc(gTeamStat[TEAM_BLUE].Goals, tgcScoreCount); // Blue Scores
+ Inc(gTeamStat[TEAM_BLUE].Score, tgcScoreCount); // Blue Scores
if tgcScoreCon then
begin
if tgcScoreCon then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then
begin
end;
if (tgcScoreAction = TRIGGER_SCORE_ACTION_SUB) and (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then
begin
- Dec(gTeamStat[TEAM_BLUE].Goals, tgcScoreCount); // Blue Fouls
+ Dec(gTeamStat[TEAM_BLUE].Score, tgcScoreCount); // Blue Fouls
if tgcScoreCon then
begin
if tgcScoreCon then
begin
end;
end;
// Âûèãðûø
end;
end;
// Âûèãðûø
- if (tgcScoreAction = TRIGGER_SCORE_ACTION_WIN) and (gGameSettings.GoalLimit > 0) then
+ if (tgcScoreAction = TRIGGER_SCORE_ACTION_WIN) and (gGameSettings.ScoreLimit > 0) then
begin
// Ñâîåé èëè ÷óæîé êîìàíäû
if (tgcScoreTeam in [TRIGGER_SCORE_TEAM_MINE_RED, TRIGGER_SCORE_TEAM_MINE_BLUE]) and (g_GetUIDType(ActivateUID) = UID_PLAYER) then
begin
// Ñâîåé èëè ÷óæîé êîìàíäû
if (tgcScoreTeam in [TRIGGER_SCORE_TEAM_MINE_RED, TRIGGER_SCORE_TEAM_MINE_BLUE]) and (g_GetUIDType(ActivateUID) = UID_PLAYER) then
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED)) // Red Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED)) // Red Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
begin
- if gTeamStat[TEAM_RED].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_RED].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
begin
- gTeamStat[TEAM_RED].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_RED].Score := gGameSettings.ScoreLimit;
if tgcScoreCon then
begin
if tgcScoreCon then
begin
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE)) // Blue Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE)) // Blue Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
begin
- if gTeamStat[TEAM_BLUE].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_BLUE].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
begin
- gTeamStat[TEAM_BLUE].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_BLUE].Score := gGameSettings.ScoreLimit;
if tgcScoreCon then
begin
if tgcScoreCon then
begin
begin
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then // Red Wins
begin
begin
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then // Red Wins
begin
- if gTeamStat[TEAM_RED].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_RED].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
begin
- gTeamStat[TEAM_RED].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_RED].Score := gGameSettings.ScoreLimit;
Result := True;
end;
end;
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then // Blue Wins
begin
Result := True;
end;
end;
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then // Blue Wins
begin
- if gTeamStat[TEAM_BLUE].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_BLUE].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
begin
- gTeamStat[TEAM_BLUE].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_BLUE].Score := gGameSettings.ScoreLimit;
Result := True;
end;
end;
end;
end;
// Ïðîèãðûø
Result := True;
end;
end;
end;
end;
// Ïðîèãðûø
- if (tgcScoreAction = TRIGGER_SCORE_ACTION_LOOSE) and (gGameSettings.GoalLimit > 0) then
+ if (tgcScoreAction = TRIGGER_SCORE_ACTION_LOOSE) and (gGameSettings.ScoreLimit > 0) then
begin
// Ñâîåé èëè ÷óæîé êîìàíäû
if (tgcScoreTeam in [TRIGGER_SCORE_TEAM_MINE_RED, TRIGGER_SCORE_TEAM_MINE_BLUE]) and (g_GetUIDType(ActivateUID) = UID_PLAYER) then
begin
// Ñâîåé èëè ÷óæîé êîìàíäû
if (tgcScoreTeam in [TRIGGER_SCORE_TEAM_MINE_RED, TRIGGER_SCORE_TEAM_MINE_BLUE]) and (g_GetUIDType(ActivateUID) = UID_PLAYER) then
p := g_Player_Get(ActivateUID);
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE)) // Red Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
p := g_Player_Get(ActivateUID);
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_BLUE)) // Red Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_RED)) then
- if gTeamStat[TEAM_RED].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_RED].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
begin
- gTeamStat[TEAM_RED].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_RED].Score := gGameSettings.ScoreLimit;
if tgcScoreCon then
if tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED then
if tgcScoreCon then
if tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED then
end;
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED)) // Blue Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
end;
if ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED) and (p.Team = TEAM_RED)) // Blue Wins
or ((tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_BLUE) and (p.Team = TEAM_BLUE)) then
- if gTeamStat[TEAM_BLUE].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_BLUE].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
begin
- gTeamStat[TEAM_BLUE].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_BLUE].Score := gGameSettings.ScoreLimit;
if tgcScoreCon then
if tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED then
if tgcScoreCon then
if tgcScoreTeam = TRIGGER_SCORE_TEAM_MINE_RED then
begin
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then // Red Wins
begin
begin
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_BLUE) then // Red Wins
begin
- if gTeamStat[TEAM_RED].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_RED].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
begin
- gTeamStat[TEAM_RED].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_RED].Score := gGameSettings.ScoreLimit;
Result := True;
end;
end;
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then // Blue Wins
begin
Result := True;
end;
end;
if (tgcScoreTeam = TRIGGER_SCORE_TEAM_FORCE_RED) then // Blue Wins
begin
- if gTeamStat[TEAM_BLUE].Goals < SmallInt(gGameSettings.GoalLimit) then
+ if gTeamStat[TEAM_BLUE].Score < SmallInt(gGameSettings.ScoreLimit) then
begin
begin
- gTeamStat[TEAM_BLUE].Goals := gGameSettings.GoalLimit;
+ gTeamStat[TEAM_BLUE].Score := gGameSettings.ScoreLimit;
Result := True;
end;
end;
Result := True;
end;
end;