Pass objptridx_t to obj_delete
This commit is contained in:
parent
0b820e1e7b
commit
a0ac77569b
|
@ -664,7 +664,7 @@ objptridx_t obj_create(enum object_type_t type, ubyte id, int segnum, const vms_
|
||||||
int obj_create_copy(int objnum, vms_vector *new_pos, int newsegnum);
|
int obj_create_copy(int objnum, vms_vector *new_pos, int newsegnum);
|
||||||
|
|
||||||
// remove object from the world
|
// remove object from the world
|
||||||
void obj_delete(int objnum);
|
void obj_delete(objptridx_t objnum);
|
||||||
|
|
||||||
// called after load. Takes number of objects, and objects should be
|
// called after load. Takes number of objects, and objects should be
|
||||||
// compressed
|
// compressed
|
||||||
|
|
|
@ -1256,10 +1256,9 @@ int obj_create_copy(int objnum, vms_vector *new_pos, int newsegnum)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//remove object from the world
|
//remove object from the world
|
||||||
void obj_delete(int objnum)
|
void obj_delete(objptridx_t obj)
|
||||||
{
|
{
|
||||||
Assert(objnum != object_none);
|
Assert(obj != object_none);
|
||||||
object *obj = &Objects[objnum];
|
|
||||||
Assert(obj->type != OBJ_NONE);
|
Assert(obj->type != OBJ_NONE);
|
||||||
Assert(obj != ConsoleObject);
|
Assert(obj != ConsoleObject);
|
||||||
|
|
||||||
|
@ -1289,14 +1288,14 @@ void obj_delete(int objnum)
|
||||||
if (obj->type == OBJ_DEBRIS)
|
if (obj->type == OBJ_DEBRIS)
|
||||||
Debris_object_count--;
|
Debris_object_count--;
|
||||||
|
|
||||||
obj_unlink(objnum);
|
obj_unlink(obj);
|
||||||
|
|
||||||
Assert(Objects[0].next != 0);
|
Assert(Objects[0].next != 0);
|
||||||
|
|
||||||
obj->type = OBJ_NONE; //unused!
|
obj->type = OBJ_NONE; //unused!
|
||||||
obj->signature = -1;
|
obj->signature = -1;
|
||||||
|
|
||||||
obj_free(objnum);
|
obj_free(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEATH_SEQUENCE_LENGTH (F1_0*5)
|
#define DEATH_SEQUENCE_LENGTH (F1_0*5)
|
||||||
|
|
Loading…
Reference in a new issue