MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / frameStarted

Method frameStarted

source/game/Player.cpp:228–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void Player::frameStarted(float timeSinceLastFrame)
229{
230 // Update the smooth spell cooldown
231 for(PlayerSpellData& cooldown : mSpellsCooldown)
232 {
233 if(cooldown.mCooldownNbTurnPending <= 0)
234 continue;
235 if(timeSinceLastFrame > cooldown.mCooldownTimePendingTurn)
236 {
237 cooldown.mCooldownTimePendingTurn = 0.0f;
238 continue;
239 }
240
241 cooldown.mCooldownTimePendingTurn -= timeSinceLastFrame;
242 }
243}
244
245PlayerEvent* PlayerEvent::getPlayerEventFromPacket(GameMap* gameMap, ODPacket& is)
246{

Callers 1

onFrameStartedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected