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

Function SetDate

engine/Poseidon/Game/Commands/GameStateExtWorldConfig.cpp:620–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618#endif
619
620GameValue SetDate(const GameState* state, GameValuePar oper1)
621{
622 const GameArrayType& array = oper1;
623 if (!CheckSize(state, array, 5))
624 {
625 return NOTHING;
626 }
627 for (int i = 0; i < 5; i++)
628 {
629 if (!CheckType(state, array[i], GameScalar))
630 {
631 return NOTHING;
632 }
633 }
634
635 GWorld->SetDate(toInt((float)array[0]), toInt((float)array[1]), toInt((float)array[2]), toInt((float)array[3]),
636 toInt((float)array[4]));
637 return NOTHING;
638}
639
640GameValue CenterCreate(const GameState* state, GameValuePar oper1)
641{

Callers

nothing calls this directly

Calls 4

CheckSizeFunction · 0.85
CheckTypeFunction · 0.85
SetDateMethod · 0.80
toIntFunction · 0.50

Tested by

no test coverage detected