Forum posts

Take a look at impulse 102 -- when called, it prints some information about the entity in front of the player to the console. If you can call a modified impulse 102 function in the player's UpdateClientData function (called by the player's PreThink function), you'll be set on the server side. I threw this code together in about 5 minutes. It isn't exactly what you're looking for, but it's a good place to start off. It's just what I described: impulse 102 (alive monster entities only) called every think so you'll need to edit it for your needs.

In player.h:

class CBasePlayer : public CBaseMonster
{
public:
	CBaseEntity *pAlexisEntity;
	void AlexisEntityInfo(void);
...
}
In player.cpp:

void CBasePlayer::AlexisEntityInfo(void) {
	//Give me the classname and targetname of this entity.
	pAlexisEntity = FindEntityForward( this );
	if ( pAlexisEntity && pAlexisEntity->IsAlive() && pAlexisEntity->pev->flags & FL_MONSTER)
	{
		ALERT ( at_console, "Classname: %s", STRING( pAlexisEntity->pev->classname ) );
			
		if ( !FStringNull ( pAlexisEntity->pev->targetname ) )
		{
			ALERT ( at_console, " - Targetname: %s\n", STRING( pAlexisEntity->pev->targetname ) );
		}
		else
		{
			ALERT ( at_console, " - TargetName: No Targetname\n" );
		}

		ALERT ( at_console, "Model: %s\n", STRING( pAlexisEntity->pev->model ) );

		if ( pAlexisEntity->pev->globalname )
			ALERT ( at_console, "Globalname: %s\n", STRING( pAlexisEntity->pev->globalname ) );
	}

}
In player.cpp CBasePlayer::UpdateClientData()

void CBasePlayer :: UpdateClientData( void )
{
	AlexisEntityInfo();
...
}
From here, you'll need to pull the entity's health information and classname, then send them in messages to the client DLL. Take a look at the LinkUserMessages function in player.cpp, the player's health message variable gmsgHealth, and its associated message in the same UpdateClientData function as a guide:

MESSAGE_BEGIN( MSG_ONE, gmsgHealth, NULL, pev );
	WRITE_BYTE( iHealth );
MESSAGE_END();
EDIT: Forgot to mention, this doesn't cover getting the message on the client DLL and printing the information. I'll let someone with more experience with the client chime in.
Posted 3 years ago2020-05-30 18:30:04 UTC
in Gaming For Your Sins Post #344333
Dr. Rosenberg finally getting the credit he deserves. Well done, sir.

And the mapping video is excellent as well. Earned a sub so I can watch the tutorial videos as they come out.
Posted 3 years ago2020-05-06 05:40:34 UTC
in Benefits of changing player hull size Post #344168
Hi all,

I remember The Specialists and Earth's Special Forces back in the day creating these massive maps; these things were HUGE compared to what was possible in other GoldSource mods. The secret I was told was changing the player hull size and scaling down everything else relative to the player. Does anyone here have experience doing this? If so is my memory accurate -- changing the hull drastically increased what was possible for the map size?

The entire premise of my question may be wrong. Again, I'm faintly recalling something explained to me 16 years ago.

Thanks everyone!