Skip to content

Commit

Permalink
Fix some crashy stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoru committed Apr 28, 2024
1 parent 25feda9 commit 3ef9a6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/combat/abilities/gloom.c
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,8 @@ void spikeball_move (edict_t *self)
// are we following the player's crosshairs?
if (self->activator->spikeball_follow)
{
G_GetSpawnLocation(self->activator, 8192, NULL, NULL, goalpos, NULL, PROJECT_HITBOX_FAR, false);
vec3_t v1 = {0}, v2 = {0};
G_GetSpawnLocation(self->activator, 8192, v1, v2, goalpos, NULL, PROJECT_HITBOX_FAR, false);
}
// we have no enemy
else if (!self->enemy)
Expand Down
2 changes: 1 addition & 1 deletion src/entities/drone/drone_medic.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ mframe_t mymedic_frames_attackCable [] =
ai_charge, 0, mymedic_cable_attack,
ai_charge, 0, mymedic_cable_attack,
ai_charge, 0, mymedic_cable_continue, //227--loop from 218 to here
ai_charge, 0, mymedic_cable_attack,
ai_charge, 0, NULL,
ai_charge, 0, mymedic_hook_retract, //229
ai_charge, 0, NULL,
ai_charge, 0, NULL,
Expand Down
4 changes: 3 additions & 1 deletion src/entities/drone/drone_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,9 @@ qboolean M_Initialize (edict_t *ent, edict_t *monster, float dur_bonus)
monster->touch = drone_touch;
monster->think = drone_think;
DroneList_Insert(monster);
layout_add_tracked_entity(&ent->client->layout, monster);
if (ent->client)
layout_add_tracked_entity(&ent->client->layout, monster);

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/menus/ally.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void AddAlly (edict_t *ent, edict_t *other)
void RemoveAlly (edict_t *ent, edict_t *other)
{
// will removing a player invalidate the team? (no more allies)
if (V_GetNumAllies(ent) - 1 < 1)
if (V_GetNumAllies(ent) - 1 < 1 && ent->teamnum >= 100 && ent->teamnum < 200)
{
// relinquish the team number for others to use
team_numbers[ent->teamnum - 100] = ent->teamnum;
Expand Down

0 comments on commit 3ef9a6d

Please sign in to comment.