Game Development Community

One method's called, another method gets invoked?

by Michael Rogers · in Torque Game Engine · 07/15/2005 (1:22 pm) · 3 replies

This is related to some code in 3DGPAIIO.

I'm using the debugger to trace through control/server/players/player.cs at the moment that HumanMaleAvatar::onImpact() is called (which happens when my player hurls himself off a cliff).

From onImpact(), a player's applyDamage() method is called (p. 182 in Finney's book). However, the next line of code I see in the debugger is HumanMaleAvatar::onDisabled() !

How can this be? Why am I not in a method called applyDamage()?

I'll cross-post this in the private groups, since I don't know how many people are reading the 3DGPAIO forum, and I am lost (although getting, just ever so slightly, less lost).

Thanks for clarifying this,

Michael

#1
07/15/2005 (1:41 pm)
Um, I have a theory: applyDamage() is executed, but not being traced into (I'm clicking on Step Into). After it's finished, then the engine takes over and delivers me into onDamage(), as promised whenever the damage level changes.

This sounds reasonable, but is it right? And if so, why won't the debugger step into some routines?

Thanks again,

Michael
#2
07/16/2005 (9:31 am)
It can't step into that function cuase applyDamage is not a script method. it's written in C++.
#3
07/16/2005 (2:32 pm)
Thanks you! I am now even less lost than before...

Michael