Home » MODDING HQ 1.13 » v1.13 General Development Talk » Any introduction to the code?
Re: Any introduction to the code?[message #357787 is a reply to message #357784]
|
Tue, 06 August 2019 05:25 ![Go to previous message Go to previous message](/theme/Bear_Classic_Brown/images/up.png)
|
|
MH17 |
![](/images/ranks/corporal.png) |
Messages:46
Registered:November 2018 Location: Antarctica |
|
|
sevenfm wrote on Mon, 05 August 2019 14:41@MH17
In Tactical\Overhead.cpp:
void RemoveStaticEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
{
if ( !bMapZ ) // Battle ended Above-ground
{
SECTORINFO *pSectorInfo = &(SectorInfo[SECTOR( sMapX, sMapY )]);
pSectorInfo->ubNumAdmins = pSectorInfo->ubNumTroops = pSectorInfo->ubNumElites = 0;
pSectorInfo->ubAdminsInBattle = pSectorInfo->ubTroopsInBattle = pSectorInfo->ubElitesInBattle = 0;
}
else
{
UNDERGROUND_SECTORINFO *pSectorInfo;
pSectorInfo = FindUnderGroundSector( sMapX, sMapY, bMapZ );
pSectorInfo->ubNumAdmins = pSectorInfo->ubNumTroops = pSectorInfo->ubNumElites = 0;
pSectorInfo->ubAdminsInBattle = pSectorInfo->ubTroopsInBattle = pSectorInfo->ubElitesInBattle = 0;
}
}
which is called at the end of the battle in CheckForEndOfBattle()
// Kill all enemies. Sometime even after killing all the enemies, there appeares "in battle" enemies in sector info
RemoveStaticEnemiesFromSectorInfo( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
Maybe it would be enough to add
pSectorInfo->ubNumCreatures = 0
pSectorInfo->ubCreaturesInBattle = 0
to RemoveStaticEnemiesFromSectorInfo() to fix the bug?
Thank you, bro!
Yes, it did help in my situation when I added these lines in the each branch of the if-operator.
Probably you guys can make a commit, but in my opinion it is only partial solution.
I think this way cause my girlfriend reports that she observed a very similar problem when zombies-option was totally OFF during all the game process.
She says, that after applying the Alt+O cheat code all enemies in tactical mode died, but their red markers on the strategic screen remained the same.
And the sector remained to be hostile.
Most probably, there is something else hidden deep in the code. And it is waiting for our attention.
At the moment I'm trying to reproduce the bug from her saved games.
Quote:This still leaves question why this information is not updated when creature is killed.
I would like to know that too...
The function "RaiseZombies" correctly increases a counter of the raised deadmen (file "Rotting Corpses.cpp", line 2730) right in the sector data structure.
pSector->ubNumCreatures++;
pSector->ubCreaturesInBattle++;
Why we postpone the decrement of the counter to the end of the combat? I think we should decrease the counter in the moment when the creature died.
[Updated on: Tue, 06 August 2019 05:29] Report message to a moderator
|
Corporal
|
|
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
![icon12.gif](/images/message_icons/icon12.gif) |
Any introduction to the code?
By: MH17 on Tue, 23 July 2019 01:45
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Tue, 30 July 2019 05:04
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Wed, 31 July 2019 09:39
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Sat, 03 August 2019 12:08
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: Deleted. on Sat, 03 August 2019 21:27
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Sun, 04 August 2019 08:43
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: Deleted. on Sun, 04 August 2019 09:58
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Sun, 04 August 2019 10:26
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Sun, 04 August 2019 11:12
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Mon, 05 August 2019 10:36
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: Deleted. on Mon, 05 August 2019 14:41
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
![icon14.gif](/images/message_icons/icon14.gif) |
Re: Any introduction to the code?
By: MH17 on Tue, 06 August 2019 05:25
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
![icon9.gif](/images/message_icons/icon9.gif) |
Re: Any introduction to the code?
By: MH17 on Tue, 06 August 2019 07:28
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Wed, 07 August 2019 07:51
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Thu, 08 August 2019 11:35
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: Deleted. on Thu, 08 August 2019 11:43
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Thu, 08 August 2019 12:12
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: Deleted. on Thu, 08 August 2019 12:39
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Thu, 08 August 2019 12:59
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: Deleted. on Thu, 08 August 2019 13:10
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Thu, 08 August 2019 13:45
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Thu, 08 August 2019 20:53
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Sun, 11 August 2019 14:57
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
![film28.png](/images/message_icons/film28.png) |
Re: Any introduction to the code?
By: MH17 on Thu, 22 August 2019 11:35
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Fri, 23 August 2019 03:22
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Fri, 23 August 2019 12:56
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: Deleted. on Fri, 23 August 2019 13:13
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Sat, 24 August 2019 10:29
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Sat, 24 August 2019 12:00
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
By: MH17 on Sun, 25 August 2019 01:35
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Any introduction to the code?
|
Goto Forum:
Current Time: Wed Feb 12 15:13:57 GMT+2 2025
Total time taken to generate the page: 0.01095 seconds
|