Bug#473673: boswars: fails to load a saved game
Kalle Olavi Niemitalo
kon at iki.fi
Thu Jan 21 14:01:39 UTC 2010
Kalle Olavi Niemitalo <kon at iki.fi> writes:
> The upstream patch r9536 does fix the SIGSEGV with duck2.sav.gz
> attached to this bug report.
Here is the upstream patch.
svn log -v -c9536 svn://bos.seul.org/svn/bos/bos/branches/boswars-2.5
svn diff -c9536 svn://bos.seul.org/svn/bos/bos/branches/boswars-2.5
-------------- next part --------------
------------------------------------------------------------------------
r9536 | feb | 2008-04-10 22:37:53 +0300 (to, 10 huhti? 2008) | 3 lines
Changed paths:
M /bos/branches/boswars-2.5/CHANGELOG
M /bos/branches/boswars-2.5/engine/unit/script_unit.cpp
M /bos/branches/boswars-2.5/engine/unit/unit.cpp
Fixed crash in savegames with destroyed buildings seen by other players
(Jimmy Salmon)
------------------------------------------------------------------------
Index: CHANGELOG
===================================================================
--- CHANGELOG (revision 9535)
+++ CHANGELOG (revision 9536)
@@ -1,6 +1,10 @@
Change log for Bos Wars
-----------------------
+Version 2.5.1:
+- Fixed crash in savegames with destroyed buildings seen by other players
+(Jimmy Salmon)
+
Version 2.5.0 (2008 3 1):
- Free OpenGL textures before changing video mode since not all platforms
destroy the OpenGL context (Jimmy Salmon)
Index: engine/unit/unit.cpp
===================================================================
--- engine/unit/unit.cpp (revision 9535)
+++ engine/unit/unit.cpp (revision 9536)
@@ -867,7 +867,11 @@
}
unit->Seen.Type = unit->Type;
unit->Seen.Constructed = unit->Constructed;
- unit->Seen.CFrame = unit->Data.Built.Frame;
+ if (unit->Orders[0]->Action == UnitActionBuilt) {
+ unit->Seen.CFrame = unit->Data.Built.Frame;
+ } else {
+ unit->Seen.CFrame = NULL;
+ }
}
/**
Index: engine/unit/script_unit.cpp
===================================================================
--- engine/unit/script_unit.cpp (revision 9535)
+++ engine/unit/script_unit.cpp (revision 9536)
@@ -612,7 +612,7 @@
CConstructionFrame *cframe;
frame = LuaToNumber(l, j + 1);
- cframe = unit->Type->Construction->Frames;
+ cframe = unit->Seen.Type->Construction->Frames;
while (frame--) {
cframe = cframe->Next;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20100121/6eeb447e/attachment.pgp>
More information about the Pkg-games-devel
mailing list