Removed delta time system from the framework

This commit is contained in:
Kayne Ruse
2014-08-19 02:52:15 +10:00
parent f52a022e64
commit 5dea53ad50
18 changed files with 31 additions and 31 deletions
+5 -5
View File
@@ -92,17 +92,17 @@ void InWorld::FrameStart() {
//
}
void InWorld::Update(double delta) {
void InWorld::Update() {
//suck in and process all waiting packets
SerialPacket* packetBuffer = static_cast<SerialPacket*>(malloc(MAX_PACKET_SIZE));
SerialPacket* packetBuffer = reinterpret_cast<SerialPacket*>(new char[MAX_PACKET_SIZE]);
while(network.Receive(packetBuffer)) {
HandlePacket(packetBuffer);
}
free(static_cast<void*>(packetBuffer));
delete reinterpret_cast<char*>(packetBuffer);
//update the characters
for (auto& it : characterMap) {
it.second.Update(delta);
it.second.Update();
}
//check the map
@@ -129,7 +129,7 @@ void InWorld::Update(double delta) {
}
if ((localCharacter->GetOrigin() + localCharacter->GetBounds()).CheckOverlap(wallBounds)) {
localCharacter->SetOrigin(localCharacter->GetOrigin() - (localCharacter->GetMotion() * delta));
localCharacter->SetOrigin(localCharacter->GetOrigin() - (localCharacter->GetMotion()));
localCharacter->SetMotion({0,0});
localCharacter->CorrectSprite();
SendPlayerUpdate();