本文整理汇总了C++中CCheckpoint::GetTargetPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ CCheckpoint::GetTargetPosition方法的具体用法?C++ CCheckpoint::GetTargetPosition怎么用?C++ CCheckpoint::GetTargetPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCheckpoint
的用法示例。
在下文中一共展示了CCheckpoint::GetTargetPosition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetTargetPosition
// getCheckpointTargetPosition(checkpointid)
SQInteger CCheckpointNatives::GetTargetPosition(SQVM * pVM)
{
EntityId checkpointId;
sq_getentity(pVM, -1, &checkpointId);
CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);
if(pCheckpoint)
{
CVector3 vecTargetPosition;
pCheckpoint->GetTargetPosition(vecTargetPosition);
sq_newtable(pVM);
sq_pushinteger(pVM, 0);
sq_pushfloat(pVM, vecTargetPosition.fX);
sq_createslot(pVM, -3);
sq_pushinteger(pVM, 1);
sq_pushfloat(pVM, vecTargetPosition.fY);
sq_createslot(pVM, -3);
sq_pushinteger(pVM, 2);
sq_pushfloat(pVM, vecTargetPosition.fZ);
sq_createslot(pVM, -3);
return 1;
}
sq_pushbool(pVM, false);
return 1;
}
示例2: GetTargetPosition
// getCheckpointTargetPosition(checkpointid)
CVector3 CCheckpointModuleNatives::GetTargetPosition(EntityId checkpointId)
{
CCheckpoint * pCheckpoint = g_pCheckpointManager->Get(checkpointId);
if(pCheckpoint)
{
CVector3 vecTargetPosition;
pCheckpoint->GetTargetPosition(vecTargetPosition);
return vecTargetPosition;
}
return CVector3();
}