void renderclients() { Sprite *d; for (int i = 0; i < players.size(); ++i) { if ((d = players[i]) && (!demoplayback || i != democlientnum)) renderclient(d, isteam(player1->team, d->team), "monster/ogro", false, 1.0f); } }
void renderclients() { dynent *d; loopv(players) { if((d = players[i]) && (!demoplayback || i!=democlientnum)) renderclient(d, isteam(player1->team, d->team), "monster/ogro", false, 1.0f, selected_player(i)); } };
void CharacterRendering::render(fpsent* entity) { Logging::log(Logging::INFO, "CharacterRendering::rendering %d\r\n", LogicSystem::getUniqueId(entity)); INDENT_LOG(Logging::INFO); if (!ClientSystem::loggedIn) // If not logged in remotely, do not render, because entities lack all the fields like model_name // in the future, perhaps add these, if we want local rendering { Logging::log(Logging::INFO, "Not logged in remotely, so not rendering\r\n"); return; } LogicEntityPtr logicEntity = LogicSystem::getLogicEntity(entity->uniqueId); if ( !logicEntity.get() ) { Logging::log(Logging::INFO, "fpsent exists, but no logic entity yet for it, so not rendering\r\n"); return; } lua::engine.getref(logicEntity.get()->luaRef); if (!lua::engine.t_get<bool>("initialized")) { Logging::log(Logging::INFO, "Not initialized, so not rendering\r\n"); return; } lua::engine.pop(1); // Render client using model name, attachments, and animation information Logging::log(Logging::INFO, "Rendering %d, with o=(%f,%f,%f)\r\n", logicEntity.get()->getUniqueId(), logicEntity.get()->getOrigin().x, logicEntity.get()->getOrigin().y, logicEntity.get()->getOrigin().z); model* theModel = logicEntity.get()->getModel(); if (theModel) { renderclient(entity, theModel->name(), logicEntity, logicEntity.get()->attachments[0].name ? logicEntity.get()->attachments : NULL, 0, logicEntity.get()->getAnimation(), 300, // Delay TODO: Figure out what this is entity->lastaction, entity->lastpain); } else { Logging::log(Logging::INFO, "No model, so no render.\r\n"); } // INTENSITY: Class above head in edit mode if (editmode) particle_textcopy(entity->abovehead(), logicEntity.get()->getClass().c_str(), 16, 1); Logging::log(Logging::INFO, "CharacterRendering::render complete.\r\n"); }
void rendergame(bool mainpass) { if(isthirdperson()) renderclient(player1, "ogro", NULL, 0, ANIM_ATTACK1, 300, player1->lastaction, player1->lastpain); renderobjects(); }
void rendermonsters() { loopv(monsters) renderclient(monsters[i], false, monstertypes[monsters[i]->mtype].mdlname, monsters[i]->mtype==5, monstertypes[monsters[i]->mtype].mscale/10.0f); }