Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
computermouth committed Sep 28, 2023
1 parent d6d1b63 commit 9cb28a9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion entity_door.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void entity_door_constructor(entity_t *e, vec3_t pos, uint8_t p1, uint8_t p2) {
p1 = atoi(str_p1);
else
p1 = 0;

entity_constructor(e, pos, p1, p2);

e->_init = (void (*)(void *, uint8_t, uint8_t))entity_door_init;
Expand Down
2 changes: 1 addition & 1 deletion entity_pickup_nailgun.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void entity_pickup_nailgun_constructor(entity_t *e, vec3_t pos, uint8_t p1, uint
e->_update = (void (*)(void *))entity_pickup_nailgun_update;
e->_pickup = (void (*)(void *))entity_pickup_nailgun_pickup;
e->_init(e, p1, p2);

e->_texture = e->_params->entity_generic_params.ref_entt->tex_id;
vector * frames = e->_params->entity_generic_params.ref_entt->frames;
uint32_t * uframes = vector_begin(frames);
Expand Down
6 changes: 3 additions & 3 deletions map.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void (*spawn_class[])(entity_t *, vec3_t, uint8_t, uint8_t) = {
/* 16 */ entity_torch_constructor,
};

ref_entt_t * map_ref_entt_from_name(char * name){
ref_entt_t * map_ref_entt_from_name(char * name) {
size_t relen = vector_size(map->ref_entities);
for(size_t i = 0; i < relen; i++) {
ref_entt_t * re = vector_at(map->ref_entities, i);
Expand All @@ -136,7 +136,7 @@ ref_entt_t * map_ref_entt_from_name(char * name){
if (strncmp(name, re->entity_name, re->name_len) == 0)
return re;
}

return NULL;
}

Expand Down Expand Up @@ -376,7 +376,7 @@ void mpack_map_parse() {
mpack_node_t mp_me = mpack_node_array_at(mp_map_entts, i);
mpack_node_t mp_me_type = mpack_node_map_cstr(mp_me, "type");
mpack_node_t mp_me_pos = mpack_node_map_cstr(mp_me, "pos");

size_t type_len = mpack_node_strlen(mp_me_type);
const char * type_name = mpack_node_str(mp_me_type);
entity_id_t id = map_lookup_entity(type_name, type_len);
Expand Down
8 changes: 4 additions & 4 deletions weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ weapon_t weapon_shotgun_constructor() {
w._init = (void (*)(void * w))weapon_shotgun_init;
w._spawn_projectile = (void (*)(void * w, vec3_t pos, float yaw, float pitch))weapon_shotgun_spawn_projectile;
w._init(&w);

ref_entt_t * shotgun = map_ref_entt_from_name("shotgun");
if(shotgun == NULL)
fprintf(stderr, "shotgun not found, incoming crash\n");
Expand All @@ -90,7 +90,7 @@ weapon_t weapon_shotgun_constructor() {
uint32_t * uframes = vector_begin(frames);
w._model->frames = uframes;
w._model->nv = shotgun->vert_len;

return w;
}

Expand Down Expand Up @@ -121,7 +121,7 @@ weapon_t weapon_nailgun_constructor() {
weapon_t w = weapon_constructor();
w._init = (void (*)(void * w))weapon_nailgun_init;
w._init(&w);

ref_entt_t * nailgun = map_ref_entt_from_name("nailgun");
if(nailgun == NULL)
fprintf(stderr, "nailgun not found, incoming crash\n");
Expand All @@ -131,7 +131,7 @@ weapon_t weapon_nailgun_constructor() {
uint32_t * uframes = vector_begin(frames);
w._model->frames = uframes;
w._model->nv = nailgun->vert_len;

return w;
}

Expand Down

0 comments on commit 9cb28a9

Please sign in to comment.