Death animation crash revisited
by Michael Cozzolino · in Torque Game Engine · 08/26/2003 (1:05 pm) · 6 replies
I can be added to the list of people having this problem. I added everything I believe that is needed for my player model. mount0,1,2 ski1,2 etc.
The only thing I can think of is that maybe the heiarchy is wrong with the ski1 and ski2.
I also ran a debug on Torque to catch what is going on at the time of crash. Here it goes.
Stack Trace
Quat16::getQuatF(QuatF * 0x00eff3f8) line 19 + 3 bytes
TSThread::getGround(float 0.000000, MatrixF * 0x00eff500) line 137 + 47 bytes
TSShapeInstance::addPath(TSThread * 0x01e6f96c, float 0.000000, float 0.0195918, MatrixF * 0x00eff614) line 913
TSShapeInstance::deltaGround1(TSThread * 0x01e6f96c, float 0.000000, float 0.0195918, MatrixF & {...}) line 994
Player::deathDelta(Point3F & {...}) line 1804
Player::updateDeathOffsets() line 1815 + 17 bytes
Player::processTick(const Move * 0x00a16028 struct Move const NullMove) line 1150
ProcessList::advanceObjects() line 233 + 24 bytes
ProcessList::advanceServerTime(unsigned int 73) line 87 + 8 bytes
serverProcess(unsigned int 73) line 603
DemoGame::processTimeEvent(TimeEvent * 0x00effcd8) line 670 + 9 bytes
GameInterface::processEvent(Event * 0x00effcd8) line 72 + 17 bytes
GameInterface::postEvent(Event & {...}) line 153 + 17 bytes
TimeManager::process() line 1222 + 23 bytes
DemoGame::main(int 1, const char * * 0x01740d50) line 498
run(int 1, const char * * 0x01740d50) line 1139 + 26 bytes
main(int 1, const char * * 0x01740d50) line 1175 + 13 bytes
mainCRTStartup() line 206 + 25 bytes
KERNEL32! bff8b560()
KERNEL32! bff8b412()
KERNEL32! bff89dd5()
Affected Function
In ts/tsTransform.cc
QuatF & Quat16::getQuatF( QuatF * q ) const
{
q->x = float( x ) / float(MAX_VAL);
q->y = float( y ) / float(MAX_VAL);
q->z = float( z ) / float(MAX_VAL);
q->w = float( w ) / float(MAX_VAL);
return *q;
}
Memory values
this 0x00000000
x CXX0030: Error: expression cannot be evaluated
y CXX0030: Error: expression cannot be evaluated
z CXX0030: Error: expression cannot be evaluated
w CXX0030: Error: expression cannot be evaluated
Can anyone tell me what is going on or maybe know what i'm doing wrong?
Thanks Coz
The only thing I can think of is that maybe the heiarchy is wrong with the ski1 and ski2.
I also ran a debug on Torque to catch what is going on at the time of crash. Here it goes.
Stack Trace
Quat16::getQuatF(QuatF * 0x00eff3f8) line 19 + 3 bytes
TSThread::getGround(float 0.000000, MatrixF * 0x00eff500) line 137 + 47 bytes
TSShapeInstance::addPath(TSThread * 0x01e6f96c, float 0.000000, float 0.0195918, MatrixF * 0x00eff614) line 913
TSShapeInstance::deltaGround1(TSThread * 0x01e6f96c, float 0.000000, float 0.0195918, MatrixF & {...}) line 994
Player::deathDelta(Point3F & {...}) line 1804
Player::updateDeathOffsets() line 1815 + 17 bytes
Player::processTick(const Move * 0x00a16028 struct Move const NullMove) line 1150
ProcessList::advanceObjects() line 233 + 24 bytes
ProcessList::advanceServerTime(unsigned int 73) line 87 + 8 bytes
serverProcess(unsigned int 73) line 603
DemoGame::processTimeEvent(TimeEvent * 0x00effcd8) line 670 + 9 bytes
GameInterface::processEvent(Event * 0x00effcd8) line 72 + 17 bytes
GameInterface::postEvent(Event & {...}) line 153 + 17 bytes
TimeManager::process() line 1222 + 23 bytes
DemoGame::main(int 1, const char * * 0x01740d50) line 498
run(int 1, const char * * 0x01740d50) line 1139 + 26 bytes
main(int 1, const char * * 0x01740d50) line 1175 + 13 bytes
mainCRTStartup() line 206 + 25 bytes
KERNEL32! bff8b560()
KERNEL32! bff8b412()
KERNEL32! bff89dd5()
Affected Function
In ts/tsTransform.cc
QuatF & Quat16::getQuatF( QuatF * q ) const
{
q->x = float( x ) / float(MAX_VAL);
q->y = float( y ) / float(MAX_VAL);
q->z = float( z ) / float(MAX_VAL);
q->w = float( w ) / float(MAX_VAL);
return *q;
}
Memory values
this 0x00000000
x CXX0030: Error: expression cannot be evaluated
y CXX0030: Error: expression cannot be evaluated
z CXX0030: Error: expression cannot be evaluated
w CXX0030: Error: expression cannot be evaluated
Can anyone tell me what is going on or maybe know what i'm doing wrong?
Thanks Coz
About the author
Indie Developer in the Albany NY area. iOS, PC, Mac OSX development. http://itunes.apple.com/us/artist/michael-cozzolino/id367780489
#2
Thanks for the reply Badguy. I'll look into that in the morning, I'm tired :)
Coz
08/26/2003 (7:35 pm)
Almost spoke too soon thought I figured it out.Thanks for the reply Badguy. I'll look into that in the morning, I'm tired :)
Coz
#3
I must be missing something because Legends uses a custom death animation I believe.
Anyone get death animations .dsq's working?
We may need a seperate tutorial just for this.
Others are having trouble as well.
www.garagegames.com/mg/forums/result.thread.php?qt=10469
08/27/2003 (8:15 am)
I tried adding all of the death animations and still get the same result. I must be missing something because Legends uses a custom death animation I believe.
Anyone get death animations .dsq's working?
We may need a seperate tutorial just for this.
Others are having trouble as well.
www.garagegames.com/mg/forums/result.thread.php?qt=10469
#4
function Player::playDeathAnimation(%this)
{
if (%this.deathIdx++ > 11)
%this.deathIdx = 1;
%this.setActionThread("Death" @ %this.deathIdx);
}
So, in theory, if you just comment out the if statement, then it will always play Death1 when you buy it.
No, I don't think this problem has anything to do with the sequence names or the amount of sequences. There's pieces of data missing from the .dts file.
Others having this problem: www.garagegames.com/mg/forums/result.thread.php?qt=12560
www.garagegames.com/mg/forums/result.thread.php?qt=10469
09/07/2003 (6:58 pm)
As far as I can tell, the number of death animations is defined by this section of script (in player.cs):function Player::playDeathAnimation(%this)
{
if (%this.deathIdx++ > 11)
%this.deathIdx = 1;
%this.setActionThread("Death" @ %this.deathIdx);
}
So, in theory, if you just comment out the if statement, then it will always play Death1 when you buy it.
No, I don't think this problem has anything to do with the sequence names or the amount of sequences. There's pieces of data missing from the .dts file.
Others having this problem: www.garagegames.com/mg/forums/result.thread.php?qt=12560
www.garagegames.com/mg/forums/result.thread.php?qt=10469
#5
I was having the same problem with death animation. Change the name of the sequence from "death1" in your player.cs file to something like "dead" anything but "death" as first five letters. In player.cc
void PlayerData::getGroundInfo(TSShapeInstance* si, TSThread* thread,ActionAnimation *dp)
{
dp->death = !dStrnicmp(dp->name, "death", 5);
if (dp->death) {
.....
}
The string comparision leads to the if clause which seems to be the reason for crash.
In player.cs, I changed to this:
"./player_death1.dsq Dead"
hope it helps.
09/16/2003 (4:20 pm)
Hi,I was having the same problem with death animation. Change the name of the sequence from "death1" in your player.cs file to something like "dead" anything but "death" as first five letters. In player.cc
void PlayerData::getGroundInfo(TSShapeInstance* si, TSThread* thread,ActionAnimation *dp)
{
dp->death = !dStrnicmp(dp->name, "death", 5);
if (dp->death) {
.....
}
The string comparision leads to the if clause which seems to be the reason for crash.
In player.cs, I changed to this:
"./player_death1.dsq Dead"
hope it helps.
Torque Owner Badguy
but, this is a stab in the dark.
how many death animations have you inserted into the engine?
correct me if im wrong. but it uses a Random death animation from the set.
so if you only give one and it has hardcoded 4 death animations (as an example)
obviously accessing an animation you dont have will kill it all.