MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / OnEvent

Method OnEvent

ogsr_engine/xrGame/Level.cpp:613–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

611}
612
613void CLevel::OnEvent(EVENT E, u64 P1, u64 /**P2/**/)
614{
615 if (E == eEntitySpawn)
616 {
617 char Name[128];
618 Name[0] = 0;
619 sscanf(LPCSTR(P1), "%s", Name);
620 Level().g_cl_Spawn(Name, 0xff, M_SPAWN_OBJECT_LOCAL, Fvector().set(0, 0, 0));
621 }
622 else if (E == eChangeRP && P1)
623 {}
624 else if (E == eDemoPlay && P1)
625 {
626 char* name = (char*)P1;
627 string_path RealName;
628 strcpy_s(RealName, name);
629 strcat_s(RealName, ".xrdemo");
630 Cameras().AddCamEffector(xr_new<CDemoPlay>(RealName, 1.3f, 0));
631 }
632 else if (E == eChangeTrack && P1)
633 {
634 // int id = atoi((char*)P1);
635 // Environment->Music_Play(id);
636 }
637 else if (E == eEnvironment)
638 {
639 // int id=0; float s=1;
640 // sscanf((char*)P1,"%d,%f",&id,&s);
641 // Environment->set_EnvMode(id,s);
642 }
643 else
644 return;
645}
646
647void CLevel::PhisStepsCallback(u32, u32) {}
648

Callers 1

cl_Process_EventMethod · 0.45

Calls 3

g_cl_SpawnMethod · 0.80
AddCamEffectorMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected