|
group2 0.1.0
CSE 125 Group 2
|
Classes | |
| struct | SpawnPoint |
| A player spawn point: world position plus an authored facing yaw. More... | |
| struct | WeaponSpawner |
| struct | PowerupSpawner |
| struct | HealthPackSpawner |
| struct | JumpPadSpawner |
| Jump pad authored in Blender (entity_type = 3). More... | |
| struct | KillzoneSpawner |
| Killzone authored in Blender (entity_type = 4). More... | |
Functions | |
| physics::MapLoadOptions | makeLoadOptions () |
| Build the MapLoadOptions used by both client and server. | |
| std::string | mapAbsolutePath () |
| Resolve the absolute path of the configured map file. | |
| void | traverseNodeTree (const aiNode *node, int depth=0) |
| void * | getMetadataValue (const aiMetadata *metadata, const std::string &key) |
| float | getMetadataFloat (const aiMetadata *metadata, const std::string &key, float fallback) |
| Read a numeric custom property as float. | |
| bool | loadConfiguredMap (physics::MapCollisionData &out, const char *tag) |
| Load the configured map's collision into out. | |
Variables | |
| constexpr bool | k_separatedCollisionMap = false |
| Does this map use SEPARATED collision and visual meshes? | |
| constexpr const char * | k_collisionPattern = "COL_" |
| Substring that identifies collision-only nodes in separated mode. | |
| constexpr bool | k_useVhacd = false |
| Run V-HACD convex decomposition on non-convex prop meshes? | |
| std::vector< SpawnPoint > | spawnPoints_ |
| std::vector< WeaponSpawner > | weaponSpawner_ |
| std::vector< PowerupSpawner > | powerupSpawner_ |
| std::vector< HealthPackSpawner > | healthPackSpawner_ |
| std::vector< JumpPadSpawner > | jumpPadSpawner_ |
| std::vector< KillzoneSpawner > | killzoneSpawner_ |
|
inline |
Read a numeric custom property as float.
Blender exports floats as AI_DOUBLE and ints as AI_INT32; either is accepted. Returns fallback when the key is missing or has an unsupported type.
| void * gamemap::getMetadataValue | ( | const aiMetadata * | metadata, |
| const std::string & | key ) |
|
inline |
Load the configured map's collision into out.
Both client and server call this so they end up with identical primitives (a prerequisite for prediction parity). Logs success/failure with tag so each side keeps its [client] / [server] prefix.
| out | Filled with extracted collision primitives on success. |
| tag | Short side identifier used in log output ("client" / "server"). |
|
inlinenodiscard |
Build the MapLoadOptions used by both client and server.
Centralised so the two sides cannot drift. The client also reads k_separatedCollisionMap / k_collisionPattern directly when deciding which visual meshes to exclude from the renderer.
|
inlinenodiscard |
Resolve the absolute path of the configured map file.
Reads the filename from kMapAsset (in AssetCatalog.hpp) — never affected by the load-mode toggles above.
| void gamemap::traverseNodeTree | ( | const aiNode * | node, |
| int | depth = 0 ) |
|
inline |
|
inline |
|
inlineconstexpr |
Substring that identifies collision-only nodes in separated mode.
Matched case-insensitively against Assimp node names.
|
inlineconstexpr |
Does this map use SEPARATED collision and visual meshes?
false → "all-mesh mode": every mesh in the GLB is both visual and collision, loaded as authored triangles with no shape guessing. Used for blockout maps like map1.glb. true → "separated mode": collision-only nodes are tagged in Blender with the prefix kCollisionPattern and excluded from the visual model. Used for production maps where collision is hand-authored independently from rendering geometry.
IMPORTANT: this flag controls how the map is processed, not which map is loaded. The map filename comes solely from kMapAsset in AssetCatalog.hpp.
|
inlineconstexpr |
Run V-HACD convex decomposition on non-convex prop meshes?
Production map collision does not use V-HACD. COL_ map nodes are authored simplified triangle surfaces and stay triangle surfaces at runtime. This switch only exists for non-map prop experimentation.
Normal builds also compile without V-HACD; this flag only has an effect when CMake is configured with GROUP2_ENABLE_VHACD=ON. When false (default), V-HACD is bypassed and non-convex props fall back to triMesh. Disable to:
WorldTriMesh collision is the primary map path. Curved prop contact may still benefit from authored simplified collision or a future dedicated prop solution; V-HACD should not be reintroduced into map loading.
Call sites that pass decomposeCollision to physics::loadPropCollision must AND that argument with this flag — see client/game/Game.cpp, server/game/ServerGame.cpp, and clientbot/main.cpp.
|
inline |
|
inline |
|
inline |
|
inline |