Eliminate Shrunk Enemies Attacking Bug
You probably have seen this bug before.
If you shoot an shrunken enemy, and it activates the hitting animation, it will start processing the normal enemy code, but still remain small and not go back to the original size.
To fix that bug, you need to find the main ifhitweapon statement in the enemy code, which is in GAME.con by default. You will find that code many times, but probably all them will be already in the if condition from the main ifhitweapon or you have confused ifhitweapon with ifwasweapon.
All you have to do to fix this bug is add an ifai AI<enemyname><SHRUNK\SHRINK> break statement before the main ifhitweapon. Remember to search at the beginning of the enemy code for name of their shrunk artificial intellegence, as the Assault Trooper's (actor LIZTROOP) is AITROOPSHRUNK while the Pig Cop's (actor PIGCOP) is AIPIGSHRINK.
Sample:
In the Assault Trooper's (actor LIZTROOP) code, there will be the state state checktroophit where there are many ifhitweapon primitives, but they are all before ifhitweapon state checktroophit, so all them are already under that main tag.
Here is the actual code described above:
ifhitweapon state checktroophit
Change it to this:
ifai AITROOPSHRUNK break ifhitweapon state checktroophit
In addition to fixing the shrunk enemy bug, this will also fix numerous issue with the Assault Captain's teleporting code. That is one of the reasons that the authors of this tutorial selected the Assault Trooper\Captain to be our example.
It may take a bit of work, but in the end, you will receive the fruits of your labor.