aboutsummaryrefslogtreecommitdiff
path: root/src/core/bullet.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2015-10-10 23:25:14 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2015-10-10 23:25:14 +0800
commitf54345e4fc889471513cba99151a5e6a2dcef2d8 (patch)
tree0751093de4a8656ae24b139bf669f3f0a78ea417 /src/core/bullet.hpp
parentc108631ffb580cfed1e92b1a0713e11d8dcbdddd (diff)
downloadbullet-lab-remix-f54345e4fc889471513cba99151a5e6a2dcef2d8.tar.xz
This fixed yesterday's problem...
In fact there was no object slicing, but it was due to my laziness... I reused the code from BLR2 in bullet.hpp and there was no inheritance in BLR2... Also start the implementation of the plugin system.
Diffstat (limited to 'src/core/bullet.hpp')
-rw-r--r--src/core/bullet.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/bullet.hpp b/src/core/bullet.hpp
index d8f275e..afba038 100644
--- a/src/core/bullet.hpp
+++ b/src/core/bullet.hpp
@@ -56,6 +56,11 @@ public:
if(!bullets[i]->exist)break;
if(i==alloced)
bullets[alloced++]=new T;
+ else
+ {
+ delete bullets[i];
+ bullets[i]=new T;
+ }
return i;
}
return -1;