MCPcopy Create free account
hub / github.com/Norbyte/ositools / SetVector

Method SetVector

OsiInterface/Functions/DamageFunctions.cpp:222–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 }
221
222 void DamageHelpers::SetVector(char const * prop, Vector3 const & value)
223 {
224 if (Type != DamageHelpers::HT_CustomHit) {
225 OsiError("Impact vectors can only be set for custom hits");
226 return;
227 }
228
229 if (strcmp(prop, "ImpactPosition") == 0) {
230 ImpactPosition = value;
231 HasImpactPosition = true;
232 }
233 else if (strcmp(prop, "ImpactOrigin") == 0) {
234 ImpactOrigin = value;
235 HasImpactOrigin = true;
236 }
237 else if (strcmp(prop, "ImpactDirection") == 0) {
238 ImpactDirection = value;
239 HasImpactDirection = true;
240 }
241 else {
242 OsiError("Unknown vector3 property '" << prop << "'");
243 }
244 }
245
246 void DamageHelpers::SetString(char const * prop, char const * value)
247 {

Callers 2

HitSetVector3Function · 0.45
ProjectileSetVector3Function · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected