Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » Crash when going into tactical screen on mine sectors
Crash when going into tactical screen on mine sectors[message #248222] Wed, 31 March 2010 11:33 Go to previous message
bbun is currently offline bbun

 
Messages:74
Registered:April 2004
Location: Amsterdam
For some reason my compiled version on OSX would crash when going into tactical view on maps with mines (at least for drassen mine and alma mine), but only the 2nd time I entered them (and had already captured them).

I tracked this down to a Bus Error in SET_MOVEMENTCOST, triggered from:

StrategicMap.cc -> SetCurrentWorldSector
Keys.cc -> UpdateDoorGraphicsFromStatus
Keys.cc -> SyncronizeDoorStatusToStructureData
WorldDef.cc -> RecompileLocalMovementCosts
WorldDef.cc -> CompileTileMovementCosts

seems like some problem calculating movement costs for mine entrances.

Anyhow, for people running into the same problem, I fixed this by replacing

SET_MOVEMENTCOST( usGridNo, ubDirLoop,  0, TRAVELCOST_OFF_MAP );
SET_MOVEMENTCOST( usGridNo, ubDirLoop,  1, TRAVELCOST_OFF_MAP );


with

FORCE_SET_MOVEMENTCOST( usGridNo, ubDirLoop,  0, TRAVELCOST_OFF_MAP );
FORCE_SET_MOVEMENTCOST( usGridNo, ubDirLoop,  1, TRAVELCOST_OFF_MAP );


at lines 426-427 of TileEngine/WorldDef.cc

Hope this helps others.

Report message to a moderator

Corporal
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bus Error @ Tactical screen
Next Topic: Bug: looking for enemies in adjacent sectors
Goto Forum:
  


Current Time: Fri Jan 10 23:06:58 GMT+2 2025

Total time taken to generate the page: 0.01375 seconds