Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (OptimusPrime, AndrewAMD), 14,595 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Huge planes appear when creating entities [Re: Rackscha] #387388
11/17/11 21:59
11/17/11 21:59
Joined: Nov 2011
Posts: 274
de
lemming Offline OP
Member
lemming  Offline OP
Member

Joined: Nov 2011
Posts: 274
de
CUBE_MDL also gives me a white plane. So seems like it's not the model. I'll try some more testing tomorrow.

Re: Huge planes appear when creating entities [Re: lemming] #387393
11/17/11 23:06
11/17/11 23:06
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Can you show us some code? It looks like you're making a copy of the model and scaling it to near-zero in the z-axis and something huge in the other axes.


Formerly known as JulzMighty.
I made KarBOOM!
Re: Huge planes appear when creating entities [Re: JibbSmart] #387500
11/19/11 20:48
11/19/11 20:48
Joined: Nov 2011
Posts: 274
de
lemming Offline OP
Member
lemming  Offline OP
Member

Joined: Nov 2011
Posts: 274
de
It happens as soon as I equip the character. Animation seems to be not the problem, as it also happens when commenting it out.

Here is the code:
Click to reveal..
Code:
void pl_EquipChar(ENTITY* chara)
{
	// if (equip-slot is used) : remove old entity and set new one
	// {
	//		if (skill-pointer to armor-entity is set) { remove the old armor entity }
	//		skill-pointer.slot = new entity
	//	}
	//	else : not used, so remove old entity
	// {
	//		if (skill-pointer to armor-entity is set) { remove the old armor entity }
	//	}
	
	if (chara.hair > 0)
	{
		if (chara.phair != NULL) { ptr_remove((ENTITY*)chara.phair); chara.phair = NULL; }
		chara.phair = ent_create(GEAR_HAIR[chara.hair], nullvector, pl_armor);
	}
	else
	{
		if (chara.phair != NULL) { ptr_remove((ENTITY*)chara.phair); chara.phair = NULL; }
	}
	
	if (chara.head > 0)
	{
		
	}
	
	if (chara.chest > 0)
	{
		if (chara.pchest != NULL) { ptr_remove((ENTITY*)chara.pchest); chara.pchest = NULL; }
		chara.pchest = ent_create(GEAR_CHEST[chara.chest], nullvector, pl_armor);
	}
	else
	{
		if (chara.pchest != NULL) { ptr_remove((ENTITY*)chara.pchest); chara.pchest = NULL; }
	}
	
	if (chara.legs > 0)
	{
		if (chara.plegs != NULL) { ptr_remove((ENTITY*)chara.plegs); chara.plegs = NULL; }
		chara.plegs = ent_create(GEAR_LEGS[chara.legs], nullvector, pl_armor);
	}
	else
	{
		if (chara.plegs != NULL) { ptr_remove((ENTITY*)chara.plegs); chara.plegs = NULL; }
	}
	
	if (chara.feet > 0)
	{
		if (chara.pfeet != NULL) { ptr_remove((ENTITY*)chara.pfeet); chara.pfeet = NULL; }
		chara.pfeet = ent_create(GEAR_FEET[chara.feet], nullvector, pl_armor);
	}
	else
	{
		if (chara.pfeet != NULL) { ptr_remove((ENTITY*)chara.pfeet); chara.pfeet = NULL; }
	}
	
	if (chara.shoulders > 0)
	{
		
	}
	
	if (chara.hands > 0)
	{
		
	}
	
	if (chara.cape > 0)
	{
		
	}
	
	if (chara.weaponhand > 0)
	{
		if (chara.pweaponhand != NULL) { ptr_remove((ENTITY*)chara.pweaponhand); chara.pweaponhand = NULL; }
		chara.pweaponhand = ent_create(GEAR_WEAPONHAND[chara.weaponhand], nullvector, pl_armor);
	}
	else
	{
		if (chara.pweaponhand != NULL) { ptr_remove((ENTITY*)chara.pweaponhand); chara.pweaponhand = NULL; }
	}
	
	if (chara.offhand > 0)
	{
		
	}
	
	if (chara.secweapon > 0)
	{
		
	}
	
	// Adapt Settings of transparency
	var i;
	for (i=70; i<=82; i++)
	{
		if ((ENTITY*)chara.skill[i] != NULL)
		{
			if is(chara, TRANSLUCENT)
			{
				set(((ENTITY*)chara.skill[i]), TRANSLUCENT);
			}
			else
			{
				reset(((ENTITY*)chara.skill[i]), TRANSLUCENT);
			}
			((ENTITY*)chara.skill[i]).alpha = chara.alpha;
			if is(chara, INVISIBLE)
			{
				set(((ENTITY*)chara.skill[i]), INVISIBLE);
			}
			else
			{
				reset(((ENTITY*)chara.skill[i]), INVISIBLE);
			}
		}
	}
}



Definitions:
Click to reveal..
Code:
// Aussehen
#define hair			skill21
#define head			skill22
#define chest			skill23
#define legs			skill24
#define feet			skill25
#define shoulders		skill26
#define hands			skill27
#define cape			skill28
#define weaponhand	skill29
#define offhand		skill30
#define secweapon		skill31
#define skinset		skill32
#define haircolour	skill33


// Zeiger
#define phair			skill71
#define phead			skill72
#define pchest			skill73
#define plegs			skill74
#define pfeet			skill75
#define pshoulders	skill76
#define phands			skill77
#define pcape			skill78
#define pweaponhand	skill79
#define poffhand		skill80
#define psecweapon	skill81



Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1