这篇教程C++ GetGameRules函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetGameRules函数的典型用法代码示例。如果您正苦于以下问题:C++ GetGameRules函数的具体用法?C++ GetGameRules怎么用?C++ GetGameRules使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetGameRules函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: BALANCE_VARvoid AvHBaseBuildable::StartRecycle(){ if(!GetHasUpgrade(this->pev->iuser4, MASK_RECYCLING)) { int theRecycleTime = (GetGameRules()->GetCheatsEnabled() && !GetGameRules()->GetIsCheatEnabled(kcSlowResearch)) ? 2 : BALANCE_VAR(kRecycleTime); // Play recycle animation in reverse (would like to play them slower according to recycle time, but it doesn't work for all structures, seems dependent on # of keyframes) int theAnimation = this->GetRecycleAnimation(); float theTimeForAnim = this->GetTimeForAnimation(theAnimation); float theFrameRate = -1;//-theTimeForAnim/theRecycleTime; this->PlayAnimationAtIndex(theAnimation, true, theFrameRate); // Schedule time to give points back SetThink(&AvHBaseBuildable::RecycleComplete); this->mTimeRecycleStarted = gpGlobals->time; this->mTimeRecycleDone = gpGlobals->time + theRecycleTime; this->pev->nextthink = this->mTimeRecycleDone; float theVolume = .5f; EMIT_SOUND(this->edict(), CHAN_AUTO, kBuildableRecycleSound, theVolume, ATTN_NORM); SetUpgradeMask(&this->pev->iuser4, MASK_RECYCLING); // run any events for this class on recycling the structure this->UpdateOnRecycle(); // Remove tech immediately, so research or building isn't started using this tech this->TriggerRemoveTech(); }}
开发者ID:Arkshine,项目名称:NS,代码行数:33,
示例2: GetGameRulesvoid AvHHive::SetHasBeenBuilt(){ AvHBuildable::SetHasBeenBuilt(); GetGameRules()->TriggerAlert((AvHTeamNumber)this->pev->team, ALERT_HIVE_COMPLETE, this->entindex()); // Make hive support any unassigned upgrade technologies (happens after a hive supporting a technology is destroyed and then rebuilt) AvHTeamNumber theTeam = (AvHTeamNumber)this->pev->team; AvHTeam* theTeamPointer = GetGameRules()->GetTeam(theTeam); if(theTeamPointer) { AvHAlienUpgradeListType theUpgrades = theTeamPointer->GetAlienUpgrades(); if(AvHGetNumUpgradesInCategoryInList(theUpgrades, ALIEN_UPGRADE_CATEGORY_DEFENSE) > 0) { AvHSUUpdateHiveTechology(theTeam, ALIEN_BUILD_DEFENSE_CHAMBER); } if(AvHGetNumUpgradesInCategoryInList(theUpgrades, ALIEN_UPGRADE_CATEGORY_MOVEMENT) > 0) { AvHSUUpdateHiveTechology(theTeam, ALIEN_BUILD_MOVEMENT_CHAMBER); } if(AvHGetNumUpgradesInCategoryInList(theUpgrades, ALIEN_UPGRADE_CATEGORY_SENSORY) > 0) { AvHSUUpdateHiveTechology(theTeam, ALIEN_BUILD_SENSORY_CHAMBER); } }}
开发者ID:Arkshine,项目名称:NS,代码行数:29,
示例3: GetGameRulesvoid AvHBaseBuildable::BuildableTouch(CBaseEntity* inEntity){ if(inEntity->pev->team != this->pev->team) { this->Uncloak(); // GHOSTBUILDING: Destroy and return res. if (this->mGhost && inEntity->IsAlive() && inEntity->IsPlayer()) { this->TakeDamage(inEntity->pev, this->pev, 80000, DMG_GENERIC); AvHTeam* theTeam = GetGameRules()->GetTeam(AvHTeamNumber(this->pev->team)); if (theTeam) { float thePercentage = .8f; float thePointsBack = GetGameRules()->GetCostForMessageID(this->mMessageID) * thePercentage; theTeam->SetTeamResources(theTeam->GetTeamResources() + thePointsBack); AvHSUPlayNumericEventAboveStructure(thePointsBack, this); } // Uncloak the player AvHCloakable *theCloakable=dynamic_cast<AvHCloakable *>(inEntity); if ( theCloakable ) { theCloakable->Uncloak(); } } }}
开发者ID:Arkshine,项目名称:NS,代码行数:30,
示例4: Vectorvoid AvHHive::HiveAliveThink(void){ // For some reason, velocity is non-zero when created (meant they were showing up on motion-tracking) this->pev->velocity = Vector(0, 0, 0); if(GetGameRules()->GetGameStarted()) { if(!this->mActive) { bool theIsBuilding, theIsResearching; float thePercentage; AvHSHUGetBuildResearchState(this->pev->iuser3, this->pev->iuser4, this->pev->fuser1, theIsBuilding, theIsResearching, thePercentage); float theBuildTime = GetGameRules()->GetBuildTimeForMessageID(this->GetMessageID()); float theBuildPercentage = kHiveAliveThinkInterval/theBuildTime; float theNewPercentage = min(thePercentage + theBuildPercentage, 1.0f); this->SetNormalizedBuildPercentage(theNewPercentage); } else { this->ProcessHealing(); // Play idle anims AvHBaseBuildable::AnimateThink(); } this->UpdateReinforcements(); //this->UpdateUmbra(); } // Set next think this->pev->nextthink = gpGlobals->time + kHiveAliveThinkInterval;}
开发者ID:Arkshine,项目名称:NS,代码行数:35,
示例5: processBalanceChangevoid AvHTechTree::processBalanceChange(void){ // Run through our tech nodes and update cost and build time TechNodeMap::iterator current, end = mNodesByMsg.end(); for( current = mNodesByMsg.begin(); current != end; ++current ) { current->second->setBuildTime(GetGameRules()->GetBuildTimeForMessageID(current->first)); current->second->setCost(GetGameRules()->GetCostForMessageID(current->first)); }}
开发者ID:Arkshine,项目名称:NS,代码行数:10,
示例6: GetGameRulesvoid AvHBaseBuildable::UpdateDamageEffects(){ if(GetGameRules()->GetGameStarted() && this->GetIsBuilt()) { // Add special effects for structures that are hurt or almost dead float theMaxHealth = GetGameRules()->GetBaseHealthForMessageID(this->GetMessageID()); float theHealthScalar = this->pev->health/theMaxHealth; float theTimeInterval = max(gpGlobals->time - this->mTimeOfLastDamageUpdate, .1f); const float kParticleSystemLifetime = 5.0f; int theAverageSoundInterval = -1; // If we're at 25% health or less, emit black smoke if(gpGlobals->time > (this->mTimeOfLastDamageEffect + kParticleSystemLifetime)) { if(theHealthScalar < .25f) { AvHSUPlayParticleEvent(kpsBuildableLightDamage, this->edict(), this->pev->origin); this->mTimeOfLastDamageEffect = gpGlobals->time; theAverageSoundInterval = 3; } // If we're at 50% health or less, emit light smoke else if(theHealthScalar < .5f) { AvHSUPlayParticleEvent(kpsBuildableLightDamage, this->edict(), this->pev->origin); this->mTimeOfLastDamageEffect = gpGlobals->time; theAverageSoundInterval = 5; } } // If we're at less then 75% health, spark occasionally if(theHealthScalar < .75f) { int theRandomChance = RANDOM_LONG(0, (float)8/theTimeInterval); if(theRandomChance == 0) { UTIL_Sparks(this->pev->origin); UTIL_Sparks(this->pev->origin); const char* theHurtSoundToPlay = kBuildableHurt1Sound; if(RANDOM_LONG(0, 1) == 1) { theHurtSoundToPlay = kBuildableHurt2Sound; } float theVolume = .3f; EMIT_SOUND(this->edict(), CHAN_AUTO, theHurtSoundToPlay, theVolume, ATTN_NORM); } } this->mTimeOfLastDamageUpdate = gpGlobals->time; }}
开发者ID:Arkshine,项目名称:NS,代码行数:53,
示例7: compareWorldChecksum// takes filename, returns whether errors were encountered, returns whether checksums are identical or notstatic int compareWorldChecksum(lua_State* inState){ bool theSuccess = false; bool theChecksumsAreEqual = false; const char* theFileName = lua_tostring(inState, 1); Checksum theOldChecksum; theSuccess = theOldChecksum.ReadFromFile(theFileName); Checksum theNewChecksum; GetGameRules()->ComputeWorldChecksum(theNewChecksum); if(theSuccess) { StringList theErrors; theChecksumsAreEqual = theNewChecksum.Compare(theOldChecksum, theErrors); } // Return function success lua_pushnumber(inState, theSuccess); // Return checksums are equal lua_pushnumber(inState, theChecksumsAreEqual); return 2;}
开发者ID:tschumann,项目名称:naturalselection,代码行数:26,
示例8: MAKE_STRINGvoid AvHUmbraProjectile::Spawn(void){ this->Precache(); CBaseEntity::Spawn(); this->pev->movetype = MOVETYPE_FLY; this->pev->classname = MAKE_STRING(kwsUmbraProjectile); SET_MODEL(ENT(this->pev), kClientUmbraSprite); this->pev->solid = SOLID_BBOX; if(!GetGameRules()->GetDrawInvisibleEntities()) { this->pev->effects = EF_NODRAW; } else { this->pev->frame = 0; this->pev->scale = 0.5; this->pev->rendermode = kRenderTransAlpha; this->pev->renderamt = 255; } UTIL_SetSize(this->pev, Vector( 0, 0, 0), Vector(0, 0, 0)); SetTouch(&AvHUmbraProjectile::UmbraTouch);}
开发者ID:Arkshine,项目名称:NS,代码行数:28,
示例9: MAKE_STRINGvoid AvHHive::Spawn(){ this->Precache(); AvHBaseBuildable::Spawn(); this->pev->classname = MAKE_STRING(kesTeamHive); //this->pev->movetype = MOVETYPE_FLY; this->pev->movetype = MOVETYPE_FLY; this->pev->solid = SOLID_NOT; this->pev->flags = 0; this->pev->iuser3 = AVH_USER3_HIVE; this->mMaxHitPoints = GetGameRules()->GetBaseHealthForMessageID(ALIEN_BUILD_HIVE); SET_MODEL( ENT(this->pev), kHiveModel); //this->pev->scale = 2;// this->pev->sequence = 0;// this->pev->frame = 0;// ResetSequenceInfo(); this->ResetEntity();}
开发者ID:Arkshine,项目名称:NS,代码行数:26,
示例10: GetGameRulesvoid AvHResearchManager::UpdateResearch(){ // Run through every item in the list and update research, marking any done for(ResearchListType::iterator theIter = this->mResearchingTech.begin(); theIter != this->mResearchingTech.end(); ) { if(theIter->GetCanEntityContinueResearch()) { bool theHighTechCheat = GetGameRules()->GetIsCheatEnabled(kcHighTech); if(theIter->UpdateResearch() || theHighTechCheat) { AvHMessageID theResearchingTech = theIter->GetResearching(); int theEntityIndex = theIter->GetEntityIndex(); this->SetResearchDone(theResearchingTech, theEntityIndex); theIter = this->mResearchingTech.erase(theIter); } else { theIter++; } } else { theIter = this->mResearchingTech.erase(theIter); } }}
开发者ID:Arkshine,项目名称:NS,代码行数:28,
示例11: GetGameRulesvoid HolidayManager::HookIfNecessary(){ // Already hooked if (m_iHookID) return; // Nothing wants us if (m_isHolidayForward->GetFunctionCount() == 0) return; void *pGameRules = GetGameRules(); if (!pGameRules) { if (m_bInMap) { g_pSM->LogError(myself, "Gamerules ptr not found. TF2_OnIsHolidayActive will not be available."); } return; } static int offset = -1; if (offset == -1) { if (!g_pGameConf->GetOffset("IsHolidayActive", &offset)) { g_pSM->LogError(myself, "IsHolidayActive gamedata offset missing. TF2_OnIsHolidayActive will not be available."); return; } SH_MANUALHOOK_RECONFIGURE(IsHolidayActive, offset, 0, 0); } m_iHookID = SH_ADD_MANUALHOOK(IsHolidayActive, pGameRules, SH_MEMBER(this, &HolidayManager::Hook_IsHolidayActive), false);}
开发者ID:404UserNotFound,项目名称:sourcemod,代码行数:34,
示例12: MAKE_STRINGvoid AvHSpike::Spawn(){ this->Precache(); CBaseEntity::Spawn(); this->pev->movetype = MOVETYPE_FLY; this->pev->classname = MAKE_STRING(kSpikeProjectileClassName); SET_MODEL(ENT(this->pev), kSpikeProjectileModel); this->pev->solid = SOLID_BBOX; this->mDamage = 0.0f; // Comment out effects line, uncomment next four, then comment out creation of temp entity in EV_SpikeGun to see server side Spike for testing if(!GetGameRules()->GetDrawInvisibleEntities()) { this->pev->effects = EF_NODRAW; } else { this->pev->frame = 0; this->pev->scale = 0.5; this->pev->rendermode = kRenderTransAlpha; this->pev->renderamt = 255; } //UTIL_SetSize(this->pev, Vector( 0, 0, 0), Vector(0, 0, 0));// UTIL_SetSize(this->pev, Vector( -16, -16, -16), Vector(16, 16, 16)); //UTIL_SetSize(this->pev, Vector( -50, -50, -50), Vector(50, 50, 50)); SetTouch(&AvHSpike::SpikeTouch); // Enforce short range SetThink(&AvHSpike::SpikeDeath); this->pev->nextthink = gpGlobals->time + kSpikeLifetime;}
开发者ID:tschumann,项目名称:naturalselection,代码行数:35,
示例13: AvHBuildableAvHBaseBuildable::AvHBaseBuildable(AvHTechID inTechID, AvHMessageID inMessageID, char* inClassName, int inUser3) : AvHBuildable(inTechID), kStartAlpha(128), mAverageUseSoundLength(.5f){ this->mClassName = inClassName; this->mMessageID = inMessageID; this->mBaseHealth = GetGameRules()->GetBaseHealthForMessageID(inMessageID); char* theModelName = AvHSHUGetBuildTechModelName(inMessageID); ASSERT(theModelName); this->mModelName = theModelName; this->mSelectID = inUser3; this->mTimeToConstruct = GetGameRules()->GetBuildTimeForMessageID(inMessageID); // Very important that this doesn't go in Init(), else mapper-placed structures disappear on map-reset this->mPersistent = false; this->Init();}
开发者ID:Arkshine,项目名称:NS,代码行数:19,
示例14: GetGameRulesvoid AvHBuildable::TriggerAddTech() const{ AvHTeamNumber theTeamNumber = this->GetTeamNumber(); AvHTeam* theTeam = GetGameRules()->GetTeam(theTeamNumber); if(theTeam) { theTeam->TriggerAddTech(this->mTechID); }}
开发者ID:tschumann,项目名称:naturalselection,代码行数:10,
示例15: InitializeBuildable// Requires mSelectID and mMessageID to be set// Sets the pev user variables, mBaseHealth, pev->health and pev->armorvaluevoid AvHBaseBuildable::InternalInitializeBuildable(){ // Always buildable InitializeBuildable(this->pev->iuser3, this->pev->iuser4, this->pev->fuser1, this->mSelectID); this->mBaseHealth = GetGameRules()->GetBaseHealthForMessageID(this->mMessageID); this->pev->health = this->mBaseHealth*kBaseHealthPercentage; this->pev->max_health = this->mBaseHealth; // Store max health in armorvalue //this->pev->armorvalue = GetGameRules()->GetBaseHealthForMessageID(this->mMessageID);}
开发者ID:Arkshine,项目名称:NS,代码行数:13,
示例16: int AvHPlayer::GetExperienceLevel() const{ int theLevel = 1; if(GetGameRules()->GetIsCombatMode()) { theLevel = AvHPlayerUpgrade::GetPlayerLevel(this->GetExperience()); } return theLevel;}
开发者ID:Arkshine,项目名称:NS,代码行数:11,
示例17: SetExperiencevoid AvHPlayer::SetExperience(float inExperience){ if(GetGameRules()->GetIsCombatMode()) { int theCurrentLevel = AvHPlayerUpgrade::GetPlayerLevel(this->GetExperience()); this->mExperience = inExperience; // Update server player data in case we get disconnected AvHTeam* theTeam = this->GetTeamPointer(); if(theTeam) { AvHServerPlayerData* theServerPlayerData = this->GetServerPlayerData(); if(theServerPlayerData) { theServerPlayerData->SetExperience(this->mExperience); } } int theNewLevel = AvHPlayerUpgrade::GetPlayerLevel(this->GetExperience()); if(theCurrentLevel != theNewLevel) { int theIsMarine = this->GetIsMarine(); PLAYBACK_EVENT_FULL(0, this->edict(), gLevelUpEventID, 0, this->pev->origin, (float *)&g_vecZero, 0.0, 0.0, theIsMarine, 0, 0, 0 ); // Give player health and armor back on level-up, to allow more soloing, heroics, and reduce dependence on hives/resupply AvHUser3 theUser3 = AvHUser3(this->pev->iuser3); float theMaxHealth = AvHPlayerUpgrade::GetMaxHealth(this->pev->iuser4, theUser3, theCurrentLevel); float theHealthPercentage = this->pev->health/theMaxHealth; float theLevelUpHealthPercentage = BALANCE_IVAR(kCombatLevelupHealthIncreasePercent)/100.0f; theHealthPercentage = min(theHealthPercentage + theLevelUpHealthPercentage, 1.0f); this->pev->health = theHealthPercentage*theMaxHealth; float theMaxArmor = AvHPlayerUpgrade::GetMaxArmorLevel(this->pev->iuser4, theUser3); float theArmorPercentage = this->pev->armorvalue/theMaxArmor; float theLevelUpArmorPercentage = BALANCE_IVAR(kCombatLevelupArmorIncreasePercent)/100.0f; theArmorPercentage = min(theArmorPercentage + theLevelUpArmorPercentage, 1.0f); this->pev->armorvalue = theArmorPercentage*theMaxArmor; // Unlock tiers as player levels up // if(theNewLevel >= 4) // { // this->mCombatNodes.SetResearchDone(COMBAT_TIER2_UNLOCK); // } // if(theNewLevel >= 7) // { // this->mCombatNodes.SetResearchDone(COMBAT_TIER3_UNLOCK); // } } }}
开发者ID:Arkshine,项目名称:NS,代码行数:54,
示例18: AvHSUGetEntityFromIndexbool AvHResearchNode::UpdateResearch(){ bool theResearchDone = false; AvHMessageID theResearchingTech = this->GetResearching(); if(theResearchingTech != MESSAGE_NULL) { CBaseEntity* theResearchEntity = AvHSUGetEntityFromIndex(this->mEntityIndex); ASSERT(theResearchEntity); float theTimeResearchDone = this->GetTimeResearchDone(); // Set time during the first update if(theTimeResearchDone < 0) { this->mTimeResearchStarted = gpGlobals->time; theTimeResearchDone = this->mTimeResearchStarted + GetGameRules()->GetBuildTimeForMessageID(theResearchingTech); this->mTimeResearchDone = theTimeResearchDone; theResearchEntity->pev->iuser2 = (int)this->mResearch; } if((gpGlobals->time >= theTimeResearchDone) || GetGameRules()->GetIsTesting()) { theResearchDone = true; //AvHSHUSetBuildResearchState(theResearchEntity->pev->iuser3, theResearchEntity->pev->iuser4, theResearchEntity->pev->fuser1, false, 0.0f); // theResearchEntity->pev->fuser1 = 0.0f; // theResearchEntity->pev->iuser2 = 0; } else { float theNormalizedResearchFactor = (gpGlobals->time - this->mTimeResearchStarted)/(this->mTimeResearchDone - this->mTimeResearchStarted); theNormalizedResearchFactor = min(max(theNormalizedResearchFactor, 0.0f), 1.0f); //theResearchEntity->pev->fuser1 = (kResearchFuser1Base + theNormalizedResearchFactor)*kNormalizationNetworkFactor; AvHSHUSetBuildResearchState(theResearchEntity->pev->iuser3, theResearchEntity->pev->iuser4, theResearchEntity->pev->fuser1, false, theNormalizedResearchFactor); } } return theResearchDone;}
开发者ID:Arkshine,项目名称:NS,代码行数:40,
示例19: ResetSequenceInfovoid AvHHive::CueRespawnEffect(AvHPlayer* inPlayer){ // Play hive animation, play effect for player? this->pev->sequence = 4; this->pev->frame = 0; ResetSequenceInfo(); // Create umbra around spawning players, but not until after late-join period (to avoid a ton of umbras all at once) if(!GetGameRules()->GetArePlayersAllowedToJoinImmediately()) { //this->CreateUmbra(inPlayer->pev->origin); }}
开发者ID:Arkshine,项目名称:NS,代码行数:13,
示例20: ASSERTbool AvHResearchManager::SetResearchDone(AvHMessageID inTech, int inEntityIndex){ bool theFoundIt = false; if(this->mTechNodes.SetResearchDone(inTech)) { edict_t* theEdict = g_engfuncs.pfnPEntityOfEntIndex(inEntityIndex); ASSERT(!theEdict->free); CBaseEntity* theEntity = CBaseEntity::Instance(theEdict); ASSERT(theEntity); // Potentially inform all entities and team of upgrade GetGameRules()->ProcessTeamUpgrade(inTech, this->mTeamNumber, inEntityIndex, true); // Hook research complete AvHSUResearchComplete(theEntity, inTech); // No longer researching //theEntity->pev->fuser1 = kResearchFuser1Base*kNormalizationNetworkFactor; AvHSHUSetBuildResearchState(theEntity->pev->iuser3, theEntity->pev->iuser4, theEntity->pev->fuser1, true, 0.0f); // Tell entity that it's no longer researching AvHBuildable* theBuildable = dynamic_cast<AvHBuildable*>(theEntity); if(theBuildable) { theBuildable->SetResearching(false); } // Send message indicating research is done GetGameRules()->TriggerAlert(this->mTeamNumber, ALERT_RESEARCH_COMPLETE, inEntityIndex); theFoundIt = true; } return theFoundIt;}
开发者ID:Arkshine,项目名称:NS,代码行数:36,
示例21: BALANCE_VARfloat AvHHive::GetReinforceTime() const{ const float kMaxRespawnTime = BALANCE_VAR(kAlienRespawnTime); float theRespawnTime = (kMaxRespawnTime - kMaxRespawnTime*this->mEnergy); // puzl 0000854 // Decrease respawn wait time for aliens (NS: Classic) // With one hive, for every player above six on the alien team, // reduce the per-player respawn wait time by two-thirds of a second. // With two hives, make the reduction one-third of a second. // With three (or more, in the case of weird custom maps) hives, do not apply it. AvHTeam* theTeam = GetGameRules()->GetTeam(GetTeamNumber()); ASSERT(theTeam); int thePlayerModifier = theTeam->GetPlayerCount() - BALANCE_VAR(kAlienRespawnPlayerModifier); int theHiveCount = GetGameRules()->GetNumActiveHives(GetTeamNumber()); if ( thePlayerModifier > 0 && theHiveCount < 3 ) { float theTimeModifier = BALANCE_VAR(kAlienRespawnTimeModifier); // For one hive double the modifier if ( theHiveCount == 1 ) { theTimeModifier *= 2.0f; } theRespawnTime -= theTimeModifier * (float)thePlayerModifier; } theRespawnTime = min(max(theRespawnTime, 0.0f), kMaxRespawnTime); return theRespawnTime;}
开发者ID:Arkshine,项目名称:NS,代码行数:36,
示例22: switchvoid AvHPlayer::AwardExperienceForObjective(float inHealthChange, AvHMessageID inMessageID){ bool theAwardExperience = false; if(GetGameRules()->GetIsCombatMode()) { switch(inMessageID) { case ALIEN_BUILD_HIVE: case BUILD_COMMANDSTATION: theAwardExperience = true; break; } } if(theAwardExperience) { int theMaxHealth = GetGameRules()->GetBaseHealthForMessageID(inMessageID); float thePercentageOfHealth = inHealthChange/theMaxHealth; int theCombatObjectiveExperienceScalar = BALANCE_IVAR(kCombatObjectiveExperienceScalar); float theExperienceGained = thePercentageOfHealth*theCombatObjectiveExperienceScalar; this->SetExperience(this->GetExperience() + theExperienceGained); }}
开发者ID:Arkshine,项目名称:NS,代码行数:24,
示例23: saveWorldChecksum// takes filename, returns successstatic int saveWorldChecksum(lua_State* inState){ bool theSuccess = false; Checksum theChecksum; GetGameRules()->ComputeWorldChecksum(theChecksum); const char* theFileName = lua_tostring(inState, 1); theSuccess = theChecksum.SaveToFile(theFileName); // Return success lua_pushnumber(inState, theSuccess); return 1;}
开发者ID:tschumann,项目名称:naturalselection,代码行数:16,
注:本文中的GetGameRules函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetGateIDFromEntry函数代码示例 C++ GetGameObject函数代码示例 |