Further cleanup

This commit is contained in:
def 2017-06-02 19:44:01 +02:00
parent 9b48e902f0
commit 27074e926a
4 changed files with 10 additions and 13 deletions

View file

@ -128,7 +128,6 @@ class CSnapshotBuilder
int m_NumItems; int m_NumItems;
int m_aExtendedItemTypes[MAX_EXTENDED_ITEM_TYPES]; int m_aExtendedItemTypes[MAX_EXTENDED_ITEM_TYPES];
bool m_aExtendedItemTypesAdded[MAX_EXTENDED_ITEM_TYPES];
int m_NumExtendedItemTypes; int m_NumExtendedItemTypes;
void AddExtendedItemType(int Index); void AddExtendedItemType(int Index);

View file

@ -5,11 +5,11 @@
#include <stdio.h> #include <stdio.h>
static const CUuid TEEWORLDS_NAMESPACE = { static const CUuid TEEWORLDS_NAMESPACE = {{
// "e05ddaaa-c4e6-4cfb-b642-5d48e80c0029" // "e05ddaaa-c4e6-4cfb-b642-5d48e80c0029"
0xe0, 0x5d, 0xda, 0xaa, 0xc4, 0xe6, 0x4c, 0xfb, 0xe0, 0x5d, 0xda, 0xaa, 0xc4, 0xe6, 0x4c, 0xfb,
0xb6, 0x42, 0x5d, 0x48, 0xe8, 0x0c, 0x00, 0x29 0xb6, 0x42, 0x5d, 0x48, 0xe8, 0x0c, 0x00, 0x29
}; }};
CUuid CalculateUuid(const char *pName) CUuid CalculateUuid(const char *pName)
{ {

View file

@ -83,7 +83,7 @@ void CBinds::UnbindAll()
{ {
for(int i = 0; i < KEY_LAST; i++) for(int i = 0; i < KEY_LAST; i++)
{ {
if(m_apKeyBindings) if(m_apKeyBindings[i])
mem_free(m_apKeyBindings[i]); mem_free(m_apKeyBindings[i]);
m_apKeyBindings[i] = 0; m_apKeyBindings[i] = 0;
} }

View file

@ -36,20 +36,18 @@ void CGameControllerDDRace::InitTeleporter()
for (int i = 0; i < Width * Height; i++) for (int i = 0; i < Width * Height; i++)
{ {
if (GameServer()->Collision()->TeleLayer()[i].m_Number > 0) int Number = GameServer()->Collision()->TeleLayer()[i].m_Number;
int Type = GameServer()->Collision()->TeleLayer()[i].m_Type;
if (Number > 0)
{ {
if (GameServer()->Collision()->TeleLayer()[i].m_Type if (Type == TILE_TELEOUT)
== TILE_TELEOUT)
{ {
m_TeleOuts[GameServer()->Collision()->TeleLayer()[i].m_Number m_TeleOuts[Number - 1].push_back(
- 1].push_back(
vec2(i % Width * 32 + 16, i / Width * 32 + 16)); vec2(i % Width * 32 + 16, i / Width * 32 + 16));
} }
else if (GameServer()->Collision()->TeleLayer()[i].m_Type else if (Type == TILE_TELECHECKOUT)
== TILE_TELECHECKOUT)
{ {
m_TeleCheckOuts[GameServer()->Collision()->TeleLayer()[i].m_Number m_TeleCheckOuts[Number - 1].push_back(
- 1].push_back(
vec2(i % Width * 32 + 16, i / Width * 32 + 16)); vec2(i % Width * 32 + 16, i / Width * 32 + 16));
} }
} }