Hey all, having a bit of a problem here:
CSprite *CSprite::SpriteCreate( const char *pSpriteName, const Vector
&origin, BOOL animate )
{
CSprite* pSprite = GetClassPtr( (CSprite *)NULL ); <-- This line
pSprite->SpriteInit( pSpriteName, origin );
pSprite->pev->classname = MAKE_STRING("env_sprite");
pSprite->pev->solid = SOLID_NOT;
pSprite->pev->movetype = MOVETYPE_NOCLIP;
if ( animate )
pSprite->TurnOn();
return pSprite;
}
For some reason, when I execute the following code with
"sprites/glow01.spr", multiple times, the indicated line doesn't execute
at all except for one instance, the last that is tried. When I use the
debugger, it completely steps over the line, even when I try to step
into GetClassPtr. It's like the line doesn't exist... I try pleading
with the debugger, pointing at the line very insistently and so forth,
but to no avail.
Anyway, so it doesn't execute the line, which means that pSprite does
not exist. This does not trouble the program, however, which happily
goes along executing the rest of the code, even while the debugger shows
that pSprite doesn't exist. If I step into the function and check the
value of this, I find that indeed it DOES have an address. But that
address is never returned, and the program proceeds as if nothing had
been returned from the function at all! It doesn't even throw errors.
It's very odd.
Any ideas?
Persuter
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders