I teleport the player in my current project this is how it is done. Note
that I am warping them to a target entity so your slap would move them
relative to their current position instead of too the info_target...
pPlayer = UTIL_GetLocalPlayer();
CBaseEntity *pTargetLocation = NULL;
pTargetLocation = gEntList.FindEntityByName(NULL, "trialLocation", NULL);
if(pTargetLocation) {
// find target for trials
Vector temp = pTargetLocation->GetAbsOrigin();
// align the player facing a painting
float paintingAngles[3] = { 0.0f, 180.0f, 90.0f };
QAngle viewAngle(0, paintingAngles[random->RandomInt(0, 2)], 0);
pPlayer->SetAbsAngles(viewAngle); // Pasting
this code in the email makes me realize it may be redundnat
Vector velocity(0,0,0);
pPlayer->Teleport(&temp, &viewAngle, &velocity);
// turn off movement
pPlayer->SetMoveType(MOVETYPE_NONE);
}
The key function is pPlayer->Teleport(location, viewAngles, velocity)
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders