# HG changeset patch # User smaxx # Date 1283366505 -7200 # Node ID 5341dc5a8919633747533591afadd78915d74d13 # Parent 7dcfdd595b30edec889b7ead32f40cb13fe5fe2d Engine: * Changed ready time's message to include the team name and show as a gamestate message * Moved ready time handling to ProcessGears in uGears (TurnTimeLeft handling) diff -r 7dcfdd595b30 -r 5341dc5a8919 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Wed Sep 01 18:06:52 2010 +0200 +++ b/hedgewars/hwengine.pas Wed Sep 01 20:41:45 2010 +0200 @@ -85,7 +85,7 @@ ProcessKbd; if not isPaused then begin - if ReadyTimeLeft = 0 then DoGameTick(Lag); + DoGameTick(Lag); ProcessVisualGears(Lag); end; end; diff -r 7dcfdd595b30 -r 5341dc5a8919 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Sep 01 18:06:52 2010 +0200 +++ b/hedgewars/uGears.pas Wed Sep 01 20:41:45 2010 +0200 @@ -848,7 +848,14 @@ and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.State and gstAttacked) = 0) then PlaySound(sndHurry, CurrentTeam^.voicepack); - dec(TurnTimeLeft) + if ReadyTimeLeft > 0 then + begin + if ReadyTimeLeft = 2000 then + PlaySound(sndComeonthen, CurrentTeam^.voicepack); + dec(ReadyTimeLeft) + end + else + dec(TurnTimeLeft) end; if skipFlag then diff -r 7dcfdd595b30 -r 5341dc5a8919 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Wed Sep 01 18:06:52 2010 +0200 +++ b/hedgewars/uStore.pas Wed Sep 01 20:41:45 2010 +0200 @@ -26,7 +26,6 @@ var PixelFormat: PSDL_PixelFormat; SDLPrimSurface: PSDL_Surface; PauseTexture, - ReadyTexture, SyncTexture, ConfirmTexture: PTexture; cScaleFactor: GLfloat; @@ -447,7 +446,6 @@ // TODO: are those textures ever freed? PauseTexture:= RenderStringTex(trmsg[sidPaused], cYellowColor, fntBig); -ReadyTexture:= RenderStringTex(trmsg[sidReady], cYellowColor, fntBig); ConfirmTexture:= RenderStringTex(trmsg[sidConfirm], cYellowColor, fntBig); SyncTexture:= RenderStringTex(trmsg[sidSync], cYellowColor, fntBig); diff -r 7dcfdd595b30 -r 5341dc5a8919 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Wed Sep 01 18:06:52 2010 +0200 +++ b/hedgewars/uTeams.pas Wed Sep 01 20:41:45 2010 +0200 @@ -287,7 +287,8 @@ PlaySound(sndIllGetYou, CurrentTeam^.voicepack) else PlaySound(sndYesSir, CurrentTeam^.voicepack); - ReadyTimeLeft:= cReadyDelay + ReadyTimeLeft:= cReadyDelay; + AddCaption(Format(shortstring(trmsg[sidReady]), CurrentTeam^.TeamName), cWhiteColor, capgrpGameState) end else begin diff -r 7dcfdd595b30 -r 5341dc5a8919 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Wed Sep 01 18:06:52 2010 +0200 +++ b/hedgewars/uWorld.pas Wed Sep 01 20:41:45 2010 +0200 @@ -857,18 +857,6 @@ if fastUntilLag then DrawCentered(0, (cScreenHeight shr 1), SyncTexture); if isPaused then DrawCentered(0, (cScreenHeight shr 1), PauseTexture); -if ReadyTimeLeft > 0 then - begin - // TODO: move outside drawing code or do a spearate step in ugears? - if (ReadyTimeLeft = 2000) or ((ReadyTimeLeft - Lag < 2000) and (ReadyTimeLeft > 2000)) then - PlaySound(sndComeonthen, CurrentTeam^.voicepack); - - if ReadyTimeLeft > Lag then - dec(ReadyTimeLeft, Lag) - else - ReadyTimeLeft:= 0; - DrawCentered(0, (cScreenHeight shr 1), ReadyTexture); - end; if not isFirstFrame and (missionTimer <> 0) or isPaused or fastUntilLag or (GameState = gsConfirm) then begin if (ReadyTimeLeft = 0) and (missionTimer > 0) then dec(missionTimer, Lag); diff -r 7dcfdd595b30 -r 5341dc5a8919 share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Wed Sep 01 18:06:52 2010 +0200 +++ b/share/hedgewars/Data/Locale/en.txt Wed Sep 01 20:41:45 2010 +0200 @@ -64,7 +64,7 @@ 01:11=This weapon or utility is not yet available! 01:12=Last round till Sudden Death! 01:13=%1 rounds till Sudden Death! -01:14=Get ready! +01:14=Get ready, %1! ; Event messages ; Hog (%1) died