Asw marine: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
m (Classifying as model entity)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Stub}}  
{{Stub}}
{{this is a|point entity|name=asw_marine|game=Alien Swarm}}
{{CD|CASW_Marine|file1=1}}
==Entity description==
{{This is a|model entity|name=asw_marine|game=Alien Swarm}}
 
This entity is the actual marine entity the player can "inhabit".  
This entity is the actual marine entity the player can "inhabit".  


Line 12: Line 13:
Here's a developer comment about this :
Here's a developer comment about this :
''..\src\game\server\swarm\asw_marine.cpp'' - '''line 822'''
''..\src\game\server\swarm\asw_marine.cpp'' - '''line 822'''
<source lang="cpp">
<syntaxhighlight lang="cpp">
// think only occurs when uninhabited  (in singleplayer at least, not sure about multi)
// think only occurs when uninhabited  (in singleplayer at least, not sure about multi)
// this is because we're not calling BaseClass::PhysicsSimulate
// this is because we're not calling BaseClass::PhysicsSimulate
void CASW_Marine::Think( void )
void CASW_Marine::Think( void )
</source>
</syntaxhighlight>


The bulk of the "think code" for the asw_marine entity is located in the ''CASW_Marine::ASWThinkEffects()'' function instead. It is called whether the player "inhabits" the marine or not.
The bulk of the "think code" for the asw_marine entity is located in the ''CASW_Marine::ASWThinkEffects()'' function instead. It is called whether the player "inhabits" the marine or not.
== See also ==
* {{ent|player|game=Alien Swarm}}

Latest revision as of 04:30, 19 May 2025

Stub

This article or section is a stub. You can help by expanding it.

C++ Class hierarchy
CASW_Marine
CASW_VPhysics_NPC
CASW_Inhabitable_NPC
CAI_PlayerAlly
CAI_BaseActor
CAI_ExpresserHost
CAI_BaseHumanoid
CAI_BaseHumanoidBase
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ asw_marine.cpp

asw_marine is a model entity available in Alien Swarm Alien Swarm.

This entity is the actual marine entity the player can "inhabit".

It features two "modes", when it's "inhabited" by a player and when it's not. The main differences between those "modes" is which think function is called, and how much control the AI has on the marine. Some more information is provided here : Swarm C++ Code Overview

Using the think function

The think function of the marine entity work differently than the others. The actual Think funtion of the asw_marine entity is only called when the marine isn't "inhabited" by a player.

Here's a developer comment about this : ..\src\game\server\swarm\asw_marine.cpp - line 822

// think only occurs when uninhabited  (in singleplayer at least, not sure about multi)
// this is because we're not calling BaseClass::PhysicsSimulate
void CASW_Marine::Think( void )

The bulk of the "think code" for the asw_marine entity is located in the CASW_Marine::ASWThinkEffects() function instead. It is called whether the player "inhabits" the marine or not.

See also