MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / FindShape

Method FindShape

engine/Poseidon/World/Entities/Vehicles/VehicleTypes.cpp:122–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122EntityType* VehicleTypeBank::FindShape(const char* shape)
123{
124 for (int i = 0; i < Size(); i++)
125 {
126 EntityType* type = Get(i);
127 if (type->IsAbstract())
128 {
129 continue;
130 }
131 if (strcmpi(type->GetShapeName(), shape))
132 {
133 continue;
134 }
135 return type;
136 }
137 return nullptr;
138}
139
140EntityType* VehicleTypeBank::FindShapeAndSimulation(const char* shape, const char* sim)
141{

Callers 1

NewObjectFunction · 0.80

Calls 4

IsAbstractMethod · 0.80
GetShapeNameMethod · 0.80
GetFunction · 0.50
strcmpiFunction · 0.50

Tested by

no test coverage detected