Add back call to rotation_blocked() lost in 896bb48.

If `ent->dmg` is `0` it's set to `2`:

```
if (!ent->dmg)
{
	ent->dmg = 2;
}
```

This enforces func_rotate dealing at least `2` damage points per tick.
Vanilla Quake II had this code a few lines below:

```
if (ent->dmg)
{
	ent->blocked = rotating_blocked;
}
```

The if clause is always true. PVS studio complained about that. By
mistake the whole block was removed, essentially preveting func_rotate
from freeing itself when blocked. This broke at least the 'Emulsifying
Flesh Press' in the fact2.bsp.

Closes #786.
This commit is contained in:
Yamagi 2022-02-05 16:26:37 +01:00
parent 896bb48d36
commit acf92bdd08

View file

@ -963,6 +963,7 @@ SP_func_rotating(edict_t *ent)
}
ent->use = rotating_use;
ent->blocked = rotating_blocked;
if (ent->spawnflags & 1)
{