From f54345e4fc889471513cba99151a5e6a2dcef2d8 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 10 Oct 2015 23:25:14 +0800 Subject: 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. --- src/core/bullet.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/bullet.hpp') 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; -- cgit v1.2.3