View previous topic :: View next topic |
Author |
Message |
rhinoduck Potatoes
Joined: 22 Oct 2012
|
Posted: Thu Sep 07, 2017 2:01 am Post subject: [ACS] Thing_Remove() and friendly monsters |
|
|
The Thing_Remove() ACS function will decrement the LEVELINFO_TOTAL_MONSTERS value, which is obtainable using a GetLevelInfo() call, even when removing a friendly monster. This can lead to the value being decremented twice if a call to SetActorProperty() setting the APROP_Friendly property from FALSE to TRUE has been made before for the same monster, because this call already decremented the LEVELINFO_TOTAL_MONSTERS value.
I don't know how friendly monsters are treated in relation to the monster counter, but it seems like they should not be counted, in which case Thing_Remove() should not decrement the value when it is removing a friendly monster. OTOH, if they should be counted, then SetActorProperty() should not mess with the counter when changing monster friendliness (APROP_Friendly). |
|
Back to top |
|
|
Kilgore Air Cavalry
Joined: 17 Jun 2003 Location: Up the river
|
Posted: Wed Jan 31, 2018 2:30 am Post subject: |
|
|
Fixed. |
|
Back to top |
|
|
rhinoduck Potatoes
Joined: 22 Oct 2012
|
Posted: Thu Feb 01, 2018 6:08 am Post subject: |
|
|
What has been initially described in this issue now works fine as friendly-monster-counting-test.mp4 shows. But the test also revealed one more remaining issue pertaining to friendly monsters; they increment the killed monsters counter when they die; they shouldn't (at least for the reason that this way you can get killed_monsters > total_monsters).
Testing can be repeated using rhinolib-dev20180123 as shown in the video. |
|
Back to top |
|
|
Kilgore Air Cavalry
Joined: 17 Jun 2003 Location: Up the river
|
Posted: Thu Feb 01, 2018 9:55 am Post subject: |
|
|
Fixed too. |
|
Back to top |
|
|
|