Home » MODDING HQ 1.13 » v1.13 Bug Reports » Bugs: Unofficial releases (SCI's), unstable and DEV builds (Read the first post before posting!)
Re: Bugs: Unofficial releases (SCI's), unstable and DEV builds[message #347170 is a reply to message #345688] Wed, 05 October 2016 13:52 Go to previous messageGo to previous message
sevenfm

 
Messages:2124
Registered:December 2012
Location: Russian Federation
Flugente wrote on Thu, 26 May 2016 17:23
Fixed in r8236. This was a vanilla bug - we never were able to interact with corpses on a roof, ever. Due to the underlying bizarre, twisted way with which we handle structures, you will still be unable to interact with a corpse on a roof after you've decapitated it, but picking it up, throwing it, gutting, stripping of blowing it up work fine.


I found that replacing GetCorpseAtGridNo with FindCorpseAtGridNo allows to interact with corpses that were inaccessible before.

ROTTING_CORPSE *GetCorpseAtGridNo( INT32 sGridNo, INT8 bLevel )
{
	// sevenfm: use FindCorpseAtGridNo instead
	return FindCorpseAtGridNo( sGridNo, bLevel );

	STRUCTURE				*pStructure, *pBaseStructure;
	INT32 sBaseGridNo;

	pStructure = FindStructure( sGridNo, STRUCTURE_CORPSE );

	if ( pStructure != NULL )
	{
		// Get base....
		pBaseStructure = FindBaseStructure( pStructure );

		// Find base gridno...
		sBaseGridNo = pBaseStructure->sGridNo;

		if ( pBaseStructure != NULL )
		{
			return(FindCorpseBasedOnStructure( sBaseGridNo, bLevel, pBaseStructure ));
		}
	}

	return( NULL );
}

ROTTING_CORPSE *FindCorpseAtGridNo( INT32 sGridNo , INT8 bLevel )
{
	INT32			cnt;
	ROTTING_CORPSE *pCorpse;

	for ( cnt = 0; cnt < giNumRottingCorpse; ++cnt )
	{
		pCorpse = &(gRottingCorpse[ cnt ] );

		if( pCorpse &&
			pCorpse->fActivated &&
			pCorpse->def.bLevel == bLevel &&
			pCorpse->def.sGridNo == sGridNo)
		{
			return pCorpse;
		}
	}

	return NULL;
}



7609+AI (r1481) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8779)

"It's already "dog-eat-dog", friend. Not sure what worse a bunch of zombies could do."


 
Read Message bug6.png
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message bug6.png
Read Message
Read Message
Read Message bug6.png
Read Message
Read Message bug6.png
Read Message bug6.png
Read Message
Read Message bug6.png
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message bug6.png
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message bug6.png
Read Message
Read Message
Read Message
Read Message bug6.png
Read Message
Read Message
Read Message bug6.png
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message bug6.png
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon10.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: XML Editor Bug Reports
Goto Forum:
  


Current Time: Sun Apr 05 22:17:14 EEST 2020

Total time taken to generate the page: 0.01550 seconds