Raised This Month: $ Target: $400
 0% 

Entity infiltrate walls


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 07-30-2010 , 17:38   Entity infiltrate walls
Reply With Quote #1

Sometimes, when I stand close to wall and i plant an entity with movetype_toss the entity starts to fall really slow and when it touches floor it does not stop, but still fall.... If I stay far from a wall I can plant it properly, mine stops at floor.
Is that normal? How can I fix it?

PHP Code:
public set_mine(id) {
  new 
Float:StartOrigin[3]

 
  new 
PlayerOrigin[3]
  
get_user_origin(idPlayerOrigin1)

  
StartOrigin[0] = float(PlayerOrigin[0])
  
StartOrigin[1] = float(PlayerOrigin[1])
  
StartOrigin[2] = float(PlayerOrigin[2]-25)

  new 
MineEnt create_entity("info_target")

  
  
entity_set_string(MineEntEV_SZ_classname"landmine")
  
entity_set_model(MineEnt"models/w_landmine_zlw.mdl")
  
entity_set_edict(MineEntEV_ENT_ownerid)
  
entity_set_int(MineEntEV_INT_movetypeMOVETYPE_TOSS)
  
  
DispatchSpawn(MineEnt)
  
  
entity_set_origin(MineEntStartOrigin)
  
entity_set_size(MineEntFloat:{-35.0, -35.0, -1.0}, Float:{35.035.02.0})
  
entity_set_int(MineEntEV_INT_solid2)
  
  

   



Last edited by Gadzislaw007; 07-30-2010 at 17:44.
Gadzislaw007 is offline
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 08-01-2010 , 12:38   Re: Entity infiltrate walls
Reply With Quote #2

BUMP!

Any ideas? Nobody has similar problem?
Gadzislaw007 is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-02-2010 , 06:40   Re: Entity infiltrate walls
Reply With Quote #3

The entity size is bigger than the player size, therefore when the entity spawns, one of the corners gets into the wall and then slowly falls.

You either lower the size of the entity or do a trace hull on player's position to see if the entity has room to spawn.
__________________
Hunter-Digital is offline
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 08-02-2010 , 10:41   Re: Entity infiltrate walls
Reply With Quote #4

I noticed it while ago. I just had to set size after entity already is stopped by ground.
Anyway thanks .
Gadzislaw007 is offline
Reply


Thread Tools
Display Modes

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 00:17.


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