Skip to content

Commit

Permalink
Merge pull request #331 from qw-ctf/nonsolidbob
Browse files Browse the repository at this point in the history
Remove non-solid func_bob entities.
  • Loading branch information
tcsabina authored Jan 24, 2024
2 parents 7124ff3 + 2413ed9 commit 026053c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/func_bob.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

// Stripped down port of dumptruckDS's func_bob.qc

// progsdump / Arcane Dimensions spawnflags
#define BOB_COLLISION 2
#define BOB_NONSOLID 4

// Dimension of the Machine spawnflags
// Not yet supported, uses different easing function, might be possible to detect.
// https://github.com/id-Software/quake-rerelease-qc/blob/main/quakec_mg1/func_bob.qc
#define FUNC_BOB_NONSOLID 1
#define FUNC_BOB_START_ON 2

static void func_bob_timer()
{
vec3_t delta;
Expand Down Expand Up @@ -46,6 +56,12 @@ static void func_bob_timer()

void SP_func_bob()
{
// Non-solid bobs not implemented yet, remove for now to not block player.
if ((int) self->s.v.spawnflags & (BOB_NONSOLID | FUNC_BOB_NONSOLID)) {
ent_remove(self);
return;
}

self->s.v.movetype = MOVETYPE_PUSH;
self->s.v.solid = SOLID_BSP;

Expand Down

0 comments on commit 026053c

Please sign in to comment.