env_sky only projects world brushes and func_details Created 2 years ago2022-01-06 11:48:15 UTC by blsha blsha

Created 2 years ago2022-01-06 11:48:15 UTC by blsha blsha

Posted 2 years ago2022-01-06 11:48:15 UTC Post #346181
So
I'm using Solokiller's Updated SDK and decided I need an env_sky in my mod because it's nice.
And well, it does work and all... but for some reason only world brushes and func_details are being projected into the sky box. If I place a monster, some other point entity or a brush entity that isn't a func_detail in my skyroom then these things won't be shown in the skybox.
Server code looks like this:

class CEnvSky : public CBaseEntity
{

public:

void Activate(void);
void Think(void);
};
void CEnvSky::Activate(void)
{
pev->effects |= EF_NODRAW;
pev->nextthink = gpGlobals->time + 0.01;
}
void CEnvSky::Think()
{
MESSAGE_BEGIN(MSG_BROADCAST, gmsgSetSky, NULL);
WRITE_BYTE(1); // mode
WRITE_COORD(pev->origin.x); // view position
WRITE_COORD(pev->origin.y);
WRITE_COORD(pev->origin.z);
MESSAGE_END();

ALERT(at_console, "env_sky messaged\n");
}
LINK_ENTITY_TO_CLASS(env_sky, CEnvSky);

Message code and the way it's handled on client is the same as in Spirit, par some minor differences since I'm using Solokiller's
What do I do?
blsha blshaWatching you.
Posted 2 years ago2022-01-06 12:39:22 UTC Post #346182
That happens because the server isn't transmitting those entities to the client. func_detail merges with worldspawn in the end, so it's visible along with world brushes.

There is a function in client.cpp in hldll that allows you to control which entities get sent to the clients, something like AddToFullPack. You'll need to additionally determine if the env_sky can see the other entities, and if so, transmit them. At least I think.

Be careful though, because you can only transmit a maximum of 256 entities.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 2 years ago2022-01-06 14:31:31 UTC Post #346183
I'm not familiar with how env_sky works, but if you're using Vluzacn's ZHLT tools then you could try putting a reversed info_overview_point in your sky room. That will cause the VIS process to mark that room as visible from anywhere else, which I think will also affect the transfer of entities between server and client.
Posted 2 years ago2022-01-07 10:07:39 UTC Post #346184
To my surprise reversed info_overview_point method worked great , thanks
blsha blshaWatching you.
You must be logged in to post a response.