Dale
Mohawk Games Developer
- Joined
- Mar 14, 2002
- Messages
- 7,601
Ok man, sorry to spam your thread like this, but I got the mod combined with my personal mod and was all hyped to spend the night playing a game when this problem popped up.. So its been my focus for the night.
First, I gave each UnitInfo an iBerthSize tag of 1 and every Unit having the tag defined fixed the problem and the game worked normally.
Also, I think this...
..would be saffer. Just in case some one enters an iBerthSize larger then the iRequiredTransportSize, or lower then 1.Code:// returns false if the unit is killed bool CvUnit::setTransportUnit(CvUnit* pTransportUnit) { CvUnit* pOldTransportUnit = getTransportUnit(); // PatchMod: Berth Size START int iCargoSize = getUnitInfo().getBerthSize(); if (iCargoSize < 1 || iCargoSize > getUnitInfo().getRequiredTransportSize()) { int iCargoSize = getUnitInfo().getRequiredTransportSize(); } // PatchMod: Berth Size END
Anyway, my game works now. I'm off to play a game.
Thanks for this. Changing the code now (good pick up). I'm a little to optomistic of people sometimes.
I've got it working correctly now too. Dunno why this one doesn't like not being defined in xml. Oh well.