File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -177,13 +177,16 @@ void CRender::LoadBuffers (CStreamReader *base_fs)
177177 u32 count = fs->r_u32 ();
178178 DCL.resize (count);
179179 VB.resize (count);
180+
181+ u32 buffer_size = (MAXD3DDECLLENGTH+1 )*sizeof (D3DVERTEXELEMENT9);
182+ D3DVERTEXELEMENT9 *dcl = (D3DVERTEXELEMENT9*)_alloca (buffer_size);
183+
180184 for (u32 i=0 ; i<count; i++)
181185 {
182186 // decl
183187
184188// D3DVERTEXELEMENT9 *dcl = (D3DVERTEXELEMENT9*) fs->pointer();
185- u32 buffer_size = (MAXD3DDECLLENGTH+1 )*sizeof (D3DVERTEXELEMENT9);
186- D3DVERTEXELEMENT9 *dcl = (D3DVERTEXELEMENT9*)_alloca (buffer_size);
189+
187190 fs->r (dcl,buffer_size);
188191 fs->advance (-(int )buffer_size);
189192
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ void CDestroyablePhysicsObject::Destroy()
9999{
100100 VERIFY (!physics_world ()->Processing ());
101101 const CGameObject *who_object = smart_cast<const CGameObject*>(FatalHit ().initiator ());
102- callback (GameObject::eDeath)(lua_game_object (),who_object ? who_object : 0 );
102+ callback (GameObject::eDeath)(lua_game_object (),who_object ? who_object-> lua_game_object () : 0 );
103103 CPHDestroyable::Destroy (ID ()," physic_destroyable_object" );
104104 if (m_destroy_sound._handle ())
105105 {
You can’t perform that action at this time.
0 commit comments