News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
Speculation 
Never seen the source code for StealthQuake, but I can explain how a similar crash can happen in vanilla Quake and that might point you in the right direction. Take a look at HuntTarget

void() HuntTarget =
{
self.goalentity = self.enemy;
self.think = self.th_run;
self.ideal_yaw = vectoyaw(self.enemy.origin - self.origin);
self.nextthink = time + 0.1;
SUB_AttackFinished (1); // wait a while before first attack
};

This function runs when a monster spots a player, and the dangerous line is self.think = self.th_run. The idea is th_run contains a think function bottled up for future use, and HuntTarget finally uncorks it. But if th_run is empty, then you've just scheduled an empty function to run in 0.1 seconds, and a crash is imminent.

Have a look at your code to see if the same transfer from th_run to think is happening when a monster wakes up, or if a similar transfer is happening from a different field. Then make sure that when you create your monster you populate that field with the correct ai function. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.