Raised This Month: $51 Target: $400
 12% 

Create entity only one player can see?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Des12
Senior Member
Join Date: Jan 2005
Old 08-13-2006 , 00:31   Create entity only one player can see?
Reply With Quote #1

I know this is possible with temporary entities/messages, however what about creating a tree, wall, or gun only one player could see?
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-13-2006 , 00:42   Re: Create entity only one player can see?
Reply With Quote #2

No, because messages are handled/processed client side, so therefore entities can be created without all the other player's connected to the server knowing about it.
You would have to create your own message, which most likely can't be done.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 08-13-2006 , 04:28   Re: Create entity only one player can see?
Reply With Quote #3

MSG_ONE?
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
Des12
Senior Member
Join Date: Jan 2005
Old 08-13-2006 , 13:02   Re: Create entity only one player can see?
Reply With Quote #4

How would you send MSG_ONE to a non-temporary entity? This even possible?
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 08-13-2006 , 13:53   Re: Create entity only one player can see?
Reply With Quote #5

u can do it the same way engine-module handles partial invisibility when on third person mode

Code:
int AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet)
{
	if(ent == host) {
		if(FStrEq(STRING(ent->v.classname), "player")) {
			if(plinfo[ENTINDEX(ent)].iViewType != CAMERA_NONE) {
				ent->v.rendermode = kRenderTransTexture;
				ent->v.renderamt = 100;
				RETURN_META_VALUE(MRES_IGNORED, 0);
			}
		}
	}

	if(FStrEq(STRING(ent->v.classname), "player")) {
		if(plinfo[ENTINDEX(ent)].iViewType != CAMERA_NONE) {
			ent->v.rendermode = plinfo[ENTINDEX(ent)].iRenderMode;
			ent->v.renderamt = plinfo[ENTINDEX(ent)].fRenderAmt;
		}
	}

	RETURN_META_VALUE(MRES_IGNORED, 0);
}
donnu how cpu intensive that is though..
__________________
plop
p3tsin is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 08-13-2006 , 14:02   Re: Create entity only one player can see?
Reply With Quote #6

Quote:
Originally Posted by Des12
How would you send MSG_ONE to a non-temporary entity? This even possible?
Misread your description. Sorry, and you cant with entities.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 08-13-2006 , 14:18   Re: Create entity only one player can see?
Reply With Quote #7

can't you just set a entity invisable? and then show it invisabl to every but if the user has blah w\e ur doin change the rendering i'm not sure if this is possible
k007 is offline
Send a message via MSN to k007
Des12
Senior Member
Join Date: Jan 2005
Old 08-13-2006 , 14:20   Re: Create entity only one player can see?
Reply With Quote #8

Quote:
Originally Posted by p3tsin
u can do it the same way engine-module handles partial invisibility when on third person mode

Code:
int AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet)
{
	if(ent == host) {
		if(FStrEq(STRING(ent->v.classname), "player")) {
			if(plinfo[ENTINDEX(ent)].iViewType != CAMERA_NONE) {
				ent->v.rendermode = kRenderTransTexture;
				ent->v.renderamt = 100;
				RETURN_META_VALUE(MRES_IGNORED, 0);
			}
		}
	}

	if(FStrEq(STRING(ent->v.classname), "player")) {
		if(plinfo[ENTINDEX(ent)].iViewType != CAMERA_NONE) {
			ent->v.rendermode = plinfo[ENTINDEX(ent)].iRenderMode;
			ent->v.renderamt = plinfo[ENTINDEX(ent)].fRenderAmt;
		}
	}

	RETURN_META_VALUE(MRES_IGNORED, 0);
}
donnu how cpu intensive that is though..
I think I know what you are talking about, as in if an entity is behind a wall your game does not render it, but once you move into view your game renders it.
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
Shurik3n
Member
Join Date: Feb 2006
Old 08-13-2006 , 18:18   Re: Create entity only one player can see?
Reply With Quote #9

That method would probably work but I'm going to bet that it makes the server laggy.
__________________
+Karma if I helped.
Shurik3n is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode