Home
last modified time | relevance | path

Searched refs:unitDef (Results 1 – 25 of 94) sorted by relevance

1234

/dports/audio/supercollider/SuperCollider-3.11.0-Source/server/scsynth/
H A DSC_UnitDef.cpp41 if (!unitDef) in UnitDef_Create()
45 unitDef->mHash = Hash(unitDef->mUnitDefName); in UnitDef_Create()
48 unitDef->mUnitCtorFunc = inCtor; in UnitDef_Create()
51 unitDef->mCmds = nullptr; in UnitDef_Create()
52 unitDef->mFlags = inFlags; in UnitDef_Create()
54 if (!AddUnitDef(unitDef)) { in UnitDef_Create()
55 free(unitDef); in UnitDef_Create()
73 if (!unitDef) in UnitDef_AddCmd()
76 if (!unitDef->mCmds) in UnitDef_AddCmd()
85 unitDef->mCmds->Add(cmd); in UnitDef_AddCmd()
[all …]
/dports/games/spring/spring_98.0/rts/Sim/Units/
H A DUnit.cpp84 unitDef(NULL), in CUnit()
338 unitDef = params.unitDef; in PreInit()
352 xsize = ((buildFacing & 1) == 0) ? unitDef->xsize : unitDef->zsize; in PreInit()
353 zsize = ((buildFacing & 1) == 1) ? unitDef->xsize : unitDef->zsize; in PreInit()
397 footprint = int2(unitDef->xsize, unitDef->zsize); in PreInit()
416 tooltip = unitDef->humanName + " - " + unitDef->tooltip; in PreInit()
488 if (unitDef->canmove || unitDef->builder) { in PostInit()
596 fallSpeed = unitDef->unitFallSpeed > 0 ? unitDef->unitFallSpeed : parent->unitDef->fallSpeed; in Drop()
1493 if (unitDef->canmove || unitDef->builder) { in ChangeTeamReset()
2152 objectDef = unitDef; in PostLoad()
[all …]
H A DUnitDefHandler.cpp269 if (unitDef->buildPic != NULL) { in GetUnitDefImage()
270 return (unitDef->buildPic->textureID); in GetUnitDefImage()
272 SetUnitDefImage(unitDef, unitDef->buildPicName); in GetUnitDefImage()
273 return unitDef->buildPic->textureID; in GetUnitDefImage()
279 if (unitDef->buildPic == NULL) { in SetUnitDefImage()
280 unitDef->buildPic = new UnitDefImage(); in SetUnitDefImage()
282 unitDef->buildPic->Free(); in SetUnitDefImage()
301 UnitDefImage* unitImage = unitDef->buildPic; in SetUnitDefImage()
311 if (unitDef->buildPic == NULL) { in SetUnitDefImage()
312 unitDef->buildPic = new UnitDefImage(); in SetUnitDefImage()
[all …]
H A DUnitLoader.cpp49 if (params.unitDef == NULL) { in LoadUnit()
63 const UnitDef* ud = params.unitDef; in LoadUnit()
262 if (unitDef != NULL) { in GiveUnits()
263 const int xsize = unitDef->xsize; in GiveUnits()
282 unitDef, in GiveUnits()
360 const UnitDef* unitDef = unit->unitDef; in FlattenGround() local
364 if (!unitDef->levelGround) return; in FlattenGround()
365 if (unitDef->IsAirUnit()) return; in FlattenGround()
391 const UnitDef* unitDef = unit->unitDef; in RestoreGround() local
395 if (!unitDef->levelGround) return; in RestoreGround()
[all …]
H A DUnitDefHandler.h37 unsigned int GetUnitDefImage(const UnitDef* unitDef);
38 void SetUnitDefImage(const UnitDef* unitDef,
40 void SetUnitDefImage(const UnitDef* unitDef,
/dports/games/spring/spring_98.0/AI/Wrappers/LegacyCpp/
H A DAIAICallback.cpp501 UnitDef* unitDef = new UnitDef(); in GetUnitDefById() local
507 unitDef->id = unitDefId; in GetUnitDefById()
571 unitDef->flankingBonusDir = pos_cache; in GetUnitDefById()
694 unitDef->flareDropVector = pos_cache; in GetUnitDefById()
698 unitDef->smoothAnim = false; in GetUnitDefById()
734 unitDef->customParams[cKeys[i]] = cValues[i]; in GetUnitDefById()
741 unitDef->movedata = new MoveData(); in GetUnitDefById()
763 unitDef->movedata = NULL; in GetUnitDefById()
768 unitDef->weapons.push_back(UnitDef::UnitDefWeapon()); in GetUnitDefById()
774 unitDef->weapons[w].mainDir = pos_cache; in GetUnitDefById()
[all …]
/dports/games/spring/spring_98.0/AI/Skirmish/Shard/src/API/spring/
H A DSpringUnitType.cpp15 boptions(unitDef->GetBuildOptions()), in CSpringUnitType()
18 unitDef(unitDef), in CSpringUnitType()
20 weaponMounts(unitDef->GetWeaponMounts()) in CSpringUnitType()
27 delete unitDef; //same as in SpringUnit.cpp in ~CSpringUnitType()
28 unitDef = NULL; in ~CSpringUnitType()
41 return this->unitDef->GetName(); in Name()
45 return unitDef->GetReclaimSpeed(); in ReclaimSpeed()
54 return unitDef->GetCost(r); in ResourceCost()
63 return unitDef->GetResourceExtractorRange(r); in Extractor()
67 return unitDef->GetHealth(); in GetMaxHealth()
[all …]
/dports/games/spring/spring_98.0/rts/Sim/Projectiles/
H A DFlareProjectile.cpp35 deathFrame(activateFrame + (owner? owner->unitDef->flareTime: 1)), in CFlareProjectile()
39 alphaFalloff = owner? 1.0f / owner->unitDef->flareTime: 1.0f; in CFlareProjectile()
45 subPos.resize(owner->unitDef->flareSalvoSize); in CFlareProjectile()
46 subSpeed.resize(owner->unitDef->flareSalvoSize); in CFlareProjectile()
62 CWorldObject::SetVelocity(speed + (owner->rightdir * owner->unitDef->flareDropVector.x)); in Update()
63 CWorldObject::SetVelocity(speed + (owner->updir * owner->unitDef->flareDropVector.y)); in Update()
75 …if(owner && lastSub < (gs->frameNum - owner->unitDef->flareSalvoDelay) && numSub<owner->unitDef->f… in Update()
78 s += owner->rightdir * owner->unitDef->flareDropVector.x; in Update()
79 s += owner->updir * owner->unitDef->flareDropVector.y; in Update()
80 s += owner->frontdir * owner->unitDef->flareDropVector.z; in Update()
[all …]
/dports/games/spring/spring_98.0/AI/Skirmish/HughAI/src-ai/hughai/unitdata/
H A DBuildTree.java79 for( UnitDef unitDef : availableunittypes ) { in init()
80 int thisunitdefid = unitDef.getUnitDefId(); in init()
81 for( UnitDef childUnitDef : unitDef.getBuildOptions() ) { in init()
97 UnitDef unitDef = playerObjects.getUnitController().getUnitDef( unit ); in UnitAdded() local
98 if( unitDef == null ) { in UnitAdded()
103 if( thisTeamsUnitDefs.contains( unitDef ) ) { in UnitAdded()
112 int thisunitdefid = unitDef.getUnitDefId(); in UnitAdded()
142 public boolean isOurTeam( UnitDef unitDef ) { in isOurTeam() argument
143 return thisTeamsUnitDefs.contains( unitDef ); in isOurTeam()
/dports/games/spring/spring_98.0/AI/Skirmish/KAIK/
H A DEconomyTracker.cpp186 if (!bt->unitDef->builder) { in frameUpdate()
428 assert(unitDef != NULL); in updateUnitUnderConstruction()
500 float endHp = unitDef->health; in updateUnitUnderConstruction()
501 float eNeed = unitDef->energyCost; in updateUnitUnderConstruction()
502 float mNeed = unitDef->metalCost; in updateUnitUnderConstruction()
503 float buildTime = unitDef->buildTime; in updateUnitUnderConstruction()
612 if (unitDef == NULL || unitDef->isCommander || unitDef->canDGun) { in UnitCreated()
623 economyUnitTracker->unitDef = unitDef; in UnitCreated()
715 if (economyUnitTracker->unitDef->extractsMetal) { in SetUnitDefDataInTracker()
748 if (unitDef == NULL || unitDef->isCommander || unitDef->canDGun) { in UnitFinished()
[all …]
/dports/games/spring/spring_98.0/rts/Sim/Units/CommandAI/
H A DBuilderCAI.cpp95 if (owner->unitDef->canRepair) { in CBuilderCAI()
114 if (owner->unitDef->canReclaim) { in CBuilderCAI()
145 if (owner->unitDef->canCapture) { in CBuilderCAI()
162 errmsg += owner->unitDef->name; in CBuilderCAI()
346 if (owner->unitDef->canmove) { in OutOfImmobileRange()
441 if (!owner->unitDef->canmove) { in GiveCommandReal()
690 if (!owner->unitDef->canRepair) in ExecuteRepair()
819 if (!owner->unitDef->canGuard) in ExecuteGuard()
1004 unit->unitDef->builder && in ExecuteReclaim()
1142 if (!owner->unitDef->canPatrol) in ExecutePatrol()
[all …]
H A DMobileCAI.cpp35 assert(owner->unitDef->IsAirUnit()); in GetAirMoveType()
127 if (owner->unitDef->canmove) { in CMobileCAI()
139 if (owner->unitDef->canPatrol) { in CMobileCAI()
150 if (owner->unitDef->canFight) { in CMobileCAI()
160 if (owner->unitDef->canGuard) { in CMobileCAI()
170 if (owner->unitDef->canfly) { in CMobileCAI()
211 if (owner->unitDef->IsAirUnit()) { in GiveCommandReal()
481 assert(owner->unitDef->canPatrol); in ExecutePatrol()
629 assert(owner->unitDef->canGuard); in ExecuteGuard()
639 owner->unitDef->canAttack && in ExecuteGuard()
[all …]
H A DAirCAI.cpp27 assert(owner->unitDef->IsAirUnit()); in GetStrafeAirMoveType()
69 if (owner->unitDef->canAttack) { in CAirCAI()
197 && !owner->unitDef->DontLand() && myPlane->autoLand) in SlowUpdate()
235 const UnitDef* ownerDef = owner->unitDef; in AirAutoGenerateTarget()
326 if (owner->unitDef->IsFighterAirUnit()) { in ExecuteFight()
395 assert(owner->unitDef->canAttack); in ExecuteAttack()
452 assert(owner->unitDef->canAttack); in ExecuteAreaAttack()
487 assert(owner->unitDef->canGuard); in ExecuteGuard()
497 owner->unitDef->canAttack && in ExecuteGuard()
527 if (owner->unitDef->canAttack) { in GetDefaultCmd()
[all …]
H A DFactoryCAI.cpp68 if (owner->unitDef->canmove) { in CFactoryCAI()
78 if (owner->unitDef->canPatrol) { in CFactoryCAI()
88 if (owner->unitDef->canFight) { in CFactoryCAI()
98 if (owner->unitDef->canGuard) { in CFactoryCAI()
111 for (bi = fac->unitDef->buildOptions.begin(); bi != fac->unitDef->buildOptions.end(); ++bi) { in CFactoryCAI()
119 errmsg += owner->unitDef->name; in CFactoryCAI()
419 if (owner->unitDef->canGuard) { in GetDefaultCmd()
/dports/games/spring/spring_98.0/rts/Sim/MoveTypes/
H A DMoveType.cpp44 maxSpeed(owner? owner->unitDef->speed / GAME_SPEED : 0.0f), in CR_BIND_DERIVED_INTERFACE()
45 maxSpeedDef(owner? owner->unitDef->speed / GAME_SPEED : 0.0f), in CR_BIND_DERIVED_INTERFACE()
46 maxWantedSpeed(owner? owner->unitDef->speed / GAME_SPEED : 0.0f), in CR_BIND_DERIVED_INTERFACE()
74 if (owner->IsInAir() && owner->unitDef->canfly) { in SlowUpdate()
78 if (owner->IsInWater() && owner->unitDef->floatOnWater) { in SlowUpdate()
84 if ((owner->IsOnGround() || owner->IsInWater()) && owner->unitDef->IsGroundUnit()) { in SlowUpdate()
111 const float turnFrames = SPRING_CIRCLE_DIVS / std::max(owner->unitDef->turnRate, 1.0f); in CalcStaticTurnRadius()
120 …antsRefuel() const { return (owner->currentFuel < (repairBelowHealth * owner->unitDef->maxFuel)); } in WantsRefuel()
H A DAAirMoveType.cpp68 accRate = std::max(0.01f, unit->unitDef->maxAcc); in CR_BIND_DERIVED_INTERFACE()
69 decRate = std::max(0.01f, unit->unitDef->maxDec); in CR_BIND_DERIVED_INTERFACE()
70 altitudeRate = std::max(0.01f, unit->unitDef->verticalSpeed); in CR_BIND_DERIVED_INTERFACE()
184 const float minHeight = owner->unitDef->canSubmerge? in UpdateLanded()
208 if (owner->unitDef->maxFuel <= 0.0f) in UpdateFuel()
255 if (unit == owner || !unit->unitDef->canfly) { in CheckForCollision()
315 if (owner->unitDef->IsStrafingAirUnit()) { in CanLandOnPad()
362 return ((owner->pos.SqDistance2D(padPos) <= 1.0f || owner->unitDef->IsHoveringAirUnit())); in HaveLandedOnPad()
403 owner->AddBuildPower(airBase, airBase->unitDef->buildSpeed / GAME_SPEED); in MoveToRepairPad()
405 owner->currentFuel += (owner->unitDef->maxFuel / (GAME_SPEED * owner->unitDef->refuelTime)); in MoveToRepairPad()
[all …]
H A DStrafeAirMoveType.cpp368 assert(owner->unitDef != NULL); in CStrafeAirMoveType()
375 collide = owner->unitDef->collide; in CStrafeAirMoveType()
377 wingAngle = owner->unitDef->wingAngle; in CStrafeAirMoveType()
389 maxBank = owner->unitDef->maxBank; in CStrafeAirMoveType()
390 maxPitch = owner->unitDef->maxPitch; in CStrafeAirMoveType()
391 turnRadius = owner->unitDef->turnRadius; in CStrafeAirMoveType()
394 (owner->unitDef->wantedHeight * 1.5f) + in CStrafeAirMoveType()
397 maxAileron = owner->unitDef->maxAileron; in CStrafeAirMoveType()
398 maxElevator = owner->unitDef->maxElevator; in CStrafeAirMoveType()
399 maxRudder = owner->unitDef->maxRudder; in CStrafeAirMoveType()
[all …]
H A DHoverAirMoveType.cpp67 airStrafe(owner->unitDef->airStrafe), in CHoverAirMoveType()
95 assert(owner->unitDef != NULL); in CHoverAirMoveType()
97 turnRate = owner->unitDef->turnRate; in CHoverAirMoveType()
101 dontLand = owner->unitDef->DontLand(); in CHoverAirMoveType()
102 collide = owner->unitDef->collide; in CHoverAirMoveType()
103 bankingAllowed = owner->unitDef->bankingAllowed; in CHoverAirMoveType()
104 useSmoothMesh = owner->unitDef->useSmoothMesh; in CHoverAirMoveType()
345 const float altitude = owner->unitDef->canSubmerge? in UpdateTakeoff()
840 float curAbsHeight = owner->unitDef->canSubmerge? in UpdateAirPhysics()
859 curAbsHeight = owner->unitDef->canSubmerge? in UpdateAirPhysics()
[all …]
H A DClassicGroundMoveType.cpp122 assert(owner->unitDef != NULL); in CClassicGroundMoveType()
127 turnRate = owner->unitDef->turnRate; in CClassicGroundMoveType()
293 wh = -owner->unitDef->waterline; in SlowUpdate()
490 if (owner->unitDef->floatOnWater) in UpdateSkid()
503 if (impactSpeed > owner->unitDef->minCollisionSpeed && owner->unitDef->minCollisionSpeed >= 0) { in UpdateSkid()
552 if (owner->unitDef->floatOnWater) in UpdateSkid()
599 if (owner->unitDef->floatOnWater) in UpdateControlledDrop()
642 … if (impactSpeed > owner->unitDef->minCollisionSpeed && owner->unitDef->minCollisionSpeed >= 0) { in CheckCollisionSkid()
645 if (impactSpeed > unit->unitDef->minCollisionSpeed && unit->unitDef->minCollisionSpeed >= 0) { in CheckCollisionSkid()
666 if (impactSpeed > unit->unitDef->minCollisionSpeed && unit->unitDef->minCollisionSpeed >= 0) { in CheckCollisionSkid()
[all …]
/dports/games/spring/spring_98.0/rts/Sim/Units/UnitTypes/
H A DBuilding.cpp32 unitDef = params.unitDef; in PreInit()
33 blockHeightChanges = unitDef->levelGround; in PreInit()
40 if (unitDef->cantBeTransported) in PostInit()
56 CUnit::ForcedMove(CGameHelper::Pos2BuildPos(BuildInfo(unitDef, newPos, buildFacing), true)); in ForcedMove()
H A DTransportUnit.cpp67 if (unitDef->holdSteady) { in Update()
144 if (!unitDef->releaseHeld) { in KillUnit()
179 if (transportee->unitDef->IsGroundUnit()) { in KillUnit()
190 if (unitDef->canfly && transportee->unitDef->canmove) { in KillUnit()
218 if (transportCapacityUsed >= unitDef->transportCapacity) in CanTransport()
220 if (unit->unitDef->cantBeTransported) in CanTransport()
234 if (unit->mass < unitDef->minTransportMass) in CanTransport()
236 if ((unit->mass + transportMassUsed) > unitDef->transportMass) in CanTransport()
296 unit->SetStunned(!unitDef->isFirePlatform); in AttachUnit()
420 if (unit->unitDef->canmove) { in DetachUnitFromAir()
[all …]
H A DBuilder.cpp114 unitDef = params.unitDef; in PreInit()
115 range3D = unitDef->buildRange3D; in PreInit()
120 buildSpeed = scale * unitDef->buildSpeed; in PreInit()
121 repairSpeed = scale * unitDef->repairSpeed; in PreInit()
122 reclaimSpeed = scale * unitDef->reclaimSpeed; in PreInit()
134 unitDef->canAssist in CanAssistUnit()
135 && (!def || (u->unitDef == def)) in CanAssistUnit()
143 if (!unitDef->canRepair) in CanRepairUnit()
150 return (u->unitDef->repairable); in CanRepairUnit()
391 assert(ud == resurrectee->unitDef); in Update()
[all …]
H A DFactory.cpp85 unitDef = params.unitDef; in PreInit()
86 buildSpeed = unitDef->buildSpeed / TEAM_SLOWUPDATE_RATE; in PreInit()
193 if (!unitDef->canBeAssisted) { in StartBuild()
207 Channels::General->PlayRandomSample(unitDef->sounds.build, buildPos); in StartBuild()
230 if (buildee->unitDef->floatOnWater && (buildeePos.y <= 0.0f)) in UpdateBuild()
231 buildeePos.y = -buildee->unitDef->waterline; in UpdateBuild()
250 if (unitDef->fullHealthFactory && buildee->health < buildee->maxHealth) { return; } in FinishBuild()
395 if (!unit->unitDef->canfly && exitPos.IsInBounds()) { in SendToEmptySpot()
417 if (!unit->unitDef->canfly) { in AssignBuildeeOrders()
424 const float xs = unitDef->xsize * SQUARE_SIZE * 0.5f; in AssignBuildeeOrders()
[all …]
/dports/games/spring/spring_98.0/rts/Game/UI/
H A DTooltipConsole.cpp117 const UnitDef* rd = unit->unitDef;; in GetDecoyResources()
169 const UnitDef* unitDef = unit->unitDef; in MakeUnitString() local
170 const UnitDef* decoyDef = enemyUnit ? unitDef->decoyDef : NULL; in MakeUnitString()
172 !enemyUnit ? unitDef : (decoyDef ? decoyDef : unitDef); in MakeUnitString()
206 unit->currentFuel, unitDef->maxFuel, in MakeUnitString()
213 const float healthScale = (decoyDef->health / unitDef->health); in MakeUnitString()
215 if (unitDef->maxFuel > 0.0f) { in MakeUnitString()
216 fuelScale = (decoyDef->maxFuel / unitDef->maxFuel); in MakeUnitString()
236 SNPRINTF(buf, 32, DARKBLUE " [TechLevel %i]", unit->unitDef->techLevel); in MakeUnitString()
/dports/games/spring/spring_98.0/rts/ExternalAI/
H A DAICallback.cpp466 const UnitDef* unitDef = unit->unitDef; in GetUnitHealth() local
494 const UnitDef* unitDef = unit->unitDef; in GetUnitMaxHealth() local
521 const UnitDef* unitDef = unit->unitDef; in GetUnitSpeed() local
524 speed = unitDef->speed; in GetUnitSpeed()
547 const UnitDef* unitDef = unit->unitDef; in GetUnitPower() local
587 const UnitDef* unitDef = unit->unitDef; in GetUnitMaxRange() local
609 const UnitDef* unitDef = unit->unitDef; in GetUnitDef() local
612 def = unitDef; in GetUnitDef()
620 def = unitDef; in GetUnitDef()
1153 BuildInfo bi(unitDef, pos, facing); in CanBuildAt()
[all …]

1234