summaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorjohannes <johannes.herman@gmail.com>2024-02-11 02:01:40 +0100
committerjohannes <johannes.herman@gmail.com>2024-02-11 02:01:40 +0100
commiteae7ca1df344ab28f451d2e8cab3e409d6d13c90 (patch)
tree846ac8ce9d2523c56e2383794e4ab079b813acbe /src/commands.c
parentc2e349569fcf796412b376db89304a19648f18b8 (diff)
format all
Diffstat (limited to 'src/commands.c')
-rw-r--r--src/commands.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/commands.c b/src/commands.c
index e2353d8..752b451 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -1,6 +1,6 @@
+#include "../inc/commands.h"
#include "../inc/demo.h"
#include "../inc/pack.h"
-#include "../inc/commands.h"
#include <stdio.h>
#include <stdlib.h>
@@ -142,7 +142,7 @@ int changemap(FILE *map, char *mapname, demo *demo)
fseek(map, 0, SEEK_END);
long mapsize = ftell(map);
fseek(map, 0, SEEK_SET);
-
+
if (mapsize < 4)
return -1;
@@ -151,7 +151,7 @@ int changemap(FILE *map, char *mapname, demo *demo)
return -1;
fread(mapbuff, 1, mapsize, map);
-
+
if (memcmp(mapbuff, "DATA", 4) != 0)
{
free(mapbuff);
@@ -160,7 +160,7 @@ int changemap(FILE *map, char *mapname, demo *demo)
free(demo->map.data);
demo->map.data = mapbuff;
-
+
if (demo->header.version >= 6)
demo->header.version = 5;
@@ -173,10 +173,10 @@ int changemap(FILE *map, char *mapname, demo *demo)
void runcommand(cmdinput *cmd, demo *demo)
{
- switch(cmd->cmdtype)
+ switch (cmd->cmdtype)
{
case 'n':
- switch(cmd->settype)
+ switch (cmd->settype)
{
case 'i':
if (setnamebyid(cmd->id, cmd->to, demo) < 0)
@@ -191,7 +191,7 @@ void runcommand(cmdinput *cmd, demo *demo)
}
break;
case 's':
- switch(cmd->settype)
+ switch (cmd->settype)
{
case 'i':
if (setskinbyid(cmd->id, cmd->to, demo) < 0)