From e99a9236cfb8ee0696a5cb042732e370c54d4cfa Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 11 Apr 2015 04:01:29 +0000 Subject: [PATCH] Avoid redundant vsegptridx calculation in object_move_one --- common/main/physics.h | 2 +- similar/main/object.cpp | 5 +++-- similar/main/physics.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/main/physics.h b/common/main/physics.h index 5d6bde021..6381a4a8e 100644 --- a/common/main/physics.h +++ b/common/main/physics.h @@ -40,7 +40,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. // these global vars are set after a call to do_physics_sim(). Ugly, I know. // list of segments went through extern unsigned n_phys_segs; -extern array phys_seglist; +extern array phys_seglist; // Simulate a physics object for this frame void do_physics_sim(vobjptridx_t obj); diff --git a/similar/main/object.cpp b/similar/main/object.cpp index 9e2a6d3f4..dcd6caf96 100644 --- a/similar/main/object.cpp +++ b/similar/main/object.cpp @@ -1711,9 +1711,10 @@ static void object_move_one(const vobjptridx_t obj) int old_level = Current_level_num; #endif for (int i=0;i phys_seglist; +array phys_seglist; #define MAX_IGNORE_OBJS 100