本文整理汇总了C++中Door::CurrentScriptRoundResults方法的典型用法代码示例。如果您正苦于以下问题:C++ Door::CurrentScriptRoundResults方法的具体用法?C++ Door::CurrentScriptRoundResults怎么用?C++ Door::CurrentScriptRoundResults使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Door
的用法示例。
在下文中一共展示了Door::CurrentScriptRoundResults方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: number
//.........这里部分代码省略.........
{
/*
* 0x4051 Dead(S:Name*)
* Returns only true if the creature with the specified script name
* has its death variable set to 1. Not every form of death sets this,
* but most do. So it's an almost complete test for death.
* The creature must have existed for this to be true.
* Note that SPRITE_IS_DEAD variables are not set if the creature is
* killed by a neutral creature.
*/
/*Script* actorScript = fScripts[trig->string1];
if (actorScript != NULL) {
// TODO: More NULL checking
const char* deathVariable = actorScript->Target()->CRE()->DeathVariable();
returnValue = fVariables[deathVariable] == 1;
}*/
break;
}
case 0x52:
{
/* OPENED(O:OBJECT*) (82 0x52) */
object_node* objectNode = FindObjectNode(trig);
if (objectNode == NULL)
break;
// TODO: We assume this is a door, but also
// containers can be opened/closed
Door* door = dynamic_cast<Door*>(fTarget.Target());
if (door == NULL)
break;
if (!door->Opened())
break;
Object* object = core->GetObject(
door->CurrentScriptRoundResults()->fOpenedBy.c_str());
if (object != NULL)
returnValue = object->MatchNode(objectNode);
break;
}
case 0x4063:
{
/*INWEAPONRANGE(O:OBJECT*) (16483 0x4063) */
int range = 40;
// TODO: Check weapon range
Object* object = FindObject(trig);
if (object != NULL)
returnValue = core->Distance(object, fTarget.Target()) <= range;
break;
}
#if 0
case 0x4068:
{
/* TimeGT(I:Time*Time)
* Returns true only if the current time is greater than
* that specified. Hours are offset by 30 minutes,
* e.g. TimeGT(1) is true between 01:30 and 02:29.
*/
break;
}
case 0x4069:
{
//TIMELT(I:TIME*TIME) (16489 0x4069)
break;