revert
r938d1c08d0d1 in favour of putting it in the chat log. I think this addresses main concern about missing text. There've been complaints in past too about conversation in bubbles not being visible in history. If the objection is that
r938d1c08d0d1 offers a more æsthetic solution, I think it should augment this, be flagged, and fix the visual issues first.
--- a/hedgewars/uGears.pas Sat Dec 07 21:41:34 2013 -0500
+++ b/hedgewars/uGears.pas Sat Dec 07 22:09:55 2013 -0500
@@ -884,9 +884,9 @@
Gear^.Hedgehog:= hh;
Gear^.Text:= text;
Gear^.FrameTicks:= x
- end
+ end;
+ ParseCommand('/say [' + hh^.Name + '] '+text, true)
end
- //else ParseCommand('say ' + text, true)
end
else if (x >= 4) then
begin
--- a/hedgewars/uScript.pas Sat Dec 07 21:41:34 2013 -0500
+++ b/hedgewars/uScript.pas Sat Dec 07 22:09:55 2013 -0500
@@ -1016,7 +1016,8 @@
vgear^.FrameTicks:= lua_tointeger(L, 3);
if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then
vgear^.FrameTicks:= 1;
- lua_pushinteger(L, vgear^.Uid)
+ lua_pushinteger(L, vgear^.Uid);
+ AddChatString(#1+'[' + gear^.Hedgehog^.Name + '] '+vgear^.text)
end
end
else
--- a/hedgewars/uVisualGears.pas Sat Dec 07 21:41:34 2013 -0500
+++ b/hedgewars/uVisualGears.pas Sat Dec 07 22:09:55 2013 -0500
@@ -247,16 +247,14 @@
else
DrawSpriteRotatedF(sprFlake, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy + SkyOffset, Gear^.Frame, 1, Gear^.Angle);*)
vgtSpeechBubble: begin
- if (Gear^.Tex <> nil) and (Gear^.State <= 2) then
+ if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1)) then
begin
- // make speech bubbles of inactive teams' hogs transparent
- if ((Gear^.State = 0) and (Gear^.Hedgehog^.Team <> CurrentTeam)) or (Gear^.State = 1) then
- begin
- tinted:= true;
- Tint($FF, $FF, $FF, $66);
- end;
- DrawTextureCentered(round(Gear^.X), round(Gear^.Y), Gear^.Tex);
- end;
+ tinted:= true;
+ Tint($FF, $FF, $FF, $66);
+ DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
+ end
+ else if (Gear^.Tex <> nil) and (((Gear^.State = 0) and (Gear^.Hedgehog^.Team = CurrentTeam)) or (Gear^.State = 2)) then
+ DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
end;
vgtSmallDamageTag: DrawTextureCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
vgtHealthTag: if Gear^.Tex <> nil then
--- a/hedgewars/uVisualGearsHandlers.pas Sat Dec 07 21:41:34 2013 -0500
+++ b/hedgewars/uVisualGearsHandlers.pas Sat Dec 07 22:09:55 2013 -0500
@@ -590,8 +590,6 @@
begin
Gear^.X:= hwFloat2Float(Gear^.Hedgehog^.Gear^.X) + (Gear^.Tex^.w div 2 - Gear^.Tag);
Gear^.Y:= hwFloat2Float(Gear^.Hedgehog^.Gear^.Y) - (16 + Gear^.Tex^.h);
- Gear^.X:= max(((-cScreenWidth + 16) / zoom) + Gear^.Tex^.w div 2, min(((cScreenWidth - 16) / zoom) - Gear^.Tex^.w div 2, Gear^.X + WorldDx));
- Gear^.Y:= max(cScreenHeight div 2 - ((cScreenHeight - 16) / (zoom)), min(cScreenHeight div 2 - ((-cScreenHeight + Gear^.Tex^.h) / (zoom)) - 64, Gear^.Y + WorldDy));
end;
if Gear^.Timer = 0 then