Oups, the 'second' problem :-) ...
CGrenadePathfollower::Launch expects a string_t as second parameter. If
you look through the code you will see that the Launch function calls
FindEntityByName by itself passing to it your string
(gEntList.FindEntityByName( NULL, sPathCornerName, NULL )).
It should be sufficient to pass "path_corner" to the Launch function.
pGrenade->Launch( 300, "path_corner" );
- archy
[EMAIL PROTECTED] wrote:
//this line of code works just fine.
CGrenadePathfollower *pGrenade =
CGrenadePathfollower::CreateGrenadePathfollower( vecSrc, angAiming,
GetOwner()->edict() );
//this line of code gives me problems in the 2nd parameter
pGrenade->Launch(300,
gEntList.FindEntityByClassnameNearest("path_corner", GetAbsOrigin, 0 ));
I'm using the SP SDK, and am implementing this unused weapon I found in
the code into the game to see if/how it works out without any
modifications. I've learned a lot so far just by trying to do this, but
I'm really stumped now on the error it gives me at compile time.
C2664 cannot convert parameter 2 from 'const Vector &(void) const' to
'const Vector &'
Can anyone help or explain to me why the first method I call to create
the grenade takes a const Vector & vecOrigin without a problem, whereas
I've tried using the same vector on the Launch method and it still gives
me an issue.
If someone can help me out with it, that'd be excellent, and I'd like to
see about posting it into one of the wiki's as a way to help the next
person like me who gets stumped.
I've also tried passing it GetABSOrigin() , and it still gives me an
error about cannot convert parameter from CBaseEntity * to string_t
Thanks,
Tim Fritz
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders