-
Автор темы
- #1
C++:
void LGameFrameworkListener::OnPreRender()
{
LGame* cGame = SSystemGlobalEnvironment::Singleton()->GetGame(); if (!cGame) return;
LGameFramework* GameFramework = cGame->GetGameFramework(); if (!GameFramework) return;
//LActor* clientActor = GameFramework->GetClientActor(); if (!clientActor) return;
//LItem* itemClient = clientActor->GetCurrentItem(); if (!itemClient) return;
// LWeapon* weaponClient = itemClient->GetWeapon(); if (!weaponClient) return;
/*
if (GetKeyState(F1)) {
if (EntityId Trigger = clientActor->isTriggerID())
{
if (LActor* Act = GameFramework->GetActorSystem()->GetActor(Trigger))
{
if (GameFramework->GetGameRules()->SiftingOutMyTeam(clientActor->GetEntityId(), Act->GetEntityId())) return;
if (CheckDead(clientActor, Act)) return;
weaponClient->StartFire();
weaponClient->StopFire();
}
}
}
*/
//if (LGame* cGame = SSystemGlobalEnvironment::Singleton()->GetGame())
{
//if (LGameFramework* cGameFramework = cGame->GetGameFramework())
{
//if (LActor* cAct = cGameFramework->GetClientActor()) {
if (LEntitySystem* cEntitySys = GameFramework->GetEntitySystem()) {
if (LEntityIt* cEntIt = cEntitySys->GetEntityIterator()) {
while (LEntity* cEnt = cEntIt->Next())
{
//HUDSilhouettes(cEnt->GetEntityId(), 1.f, 0.f, 0.f);
//if (LActor* cActor = cGameFramework->GetActorSystem()->GetActor(cEnt->GetEntityId()))
{
// if (cGameFramework->GetGameRules()->SiftingOutMyTeam(cAct->GetEntityId(), cActor->GetEntityId())) continue;
//if (CheckDead(cAct, cActor)) continue;
HUDSilhouettes(cEnt->GetEntityId(), 1.f, 0.f, 0.f);
}
}
}
}
}
}
}