Author
Topic: Est_GetViewCoord crashing on linux servers? (Read 191 times)
« on: July 22, 2010, 11:56:03 PM »
is any one else having a problem with est_getviewcoord on linux servers?
using the estcommands script of course,
works fine on my windows server, but crashes my linux server
« Reply #1 on: July 23, 2010, 04:10:49 AM »
« Reply #2 on: July 23, 2010, 09:40:49 AM »
Logged
############################### Join my Server and experience a new Mod! Click Or visit superhero-source.com ! ################################
« Reply #3 on: July 24, 2010, 06:33:21 AM »
any ideas how to work around this?
« Reply #4 on: July 24, 2010, 06:51:21 AM »
same here... just wait until they release it
« Reply #5 on: July 24, 2010, 10:19:48 AM »
same here... just wait until they release it
You could use the teleport function we made and cut out the velocity changes, and apply your code after the delay. That is about the only way we have had good success. We do it for a few races for things like ranged wards, etc. You could do something like add a third arg to it, declare it a string, and send something like wcs_teleport userid distance command, where command is something like "es_xdoblock holliday/effect/effect1" and add es.server.queuecmd(command) after the delay.
« Last Edit: July 24, 2010, 10:22:15 AM by joshtrav »
Logged
« Reply #6 on: July 24, 2010, 10:26:01 AM »
A quick and dirty of what I mean Holliday:
def load(): if not es.exists("command", "wcs_viewcoord"): es.regcmd("wcs_viewcoord", "joinwcs/teleport/viewcoord","wcs_viewcoord <userid> <command>")
def viewcoord(userid = None, command = None): if not userid: argc = int(es.getargc()) if argc != 3: return userid = int(es.getargv(1)) command = int(es.getargv(2)) if not es.exists("userid", userid): return es.precachemodel('models/props_c17/tv_monitor01_screen.mdl') index = es.createentity("prop_dynamic") es.entitysetvalue(index, 'model', 'models/props_c17/tv_monitor01_screen.mdl') es.spawnentity(index) if not index: return mindex = es.getindexprop(index, "CDynamicProp.baseclass.baseclass.baseclass.m_nModelIndex") es.setentityname(index, "precache_view_%s"%index) es.server.cmd("es_fire %s precache_view_%s kill"%(userid, index)) ptime = es.getplayerprop(userid, "CCSPlayer.baseclass.baseclass.baseclass.baseclass.baseclass.baseclass.m_flSimulationTime") es.server.queuecmd("es_xprop_dynamic_create %s props_c17/tv_monitor01_screen.mdl"%userid) gamethread.delayed(0.03, viewcoord_step2, (userid, command, mindex, ptime)) def viewcoord_step2(userid, command, mindex, ptime, count = 5): if count <= 0: return choices = { 0 : 25000, } for ent in es.createentitylist("prop_dynamic"): if es.getindexprop(ent, "CDynamicProp.baseclass.baseclass.baseclass.m_nModelIndex") == mindex: choices[ent] = abs(ptime - es.getindexprop(ent, "CDynamicProp.baseclass.baseclass.baseclass.m_flSimulationTime")) index = 0 for ent in choices: if choices[ent] < choices[index]: index = ent if index == 0: gamethread.delayed(0, teleport_step2, (userid, command, mindex, ptime, count - 1)) return view = [float(x) for x in es.getindexprop(index, "CBaseEntity.m_vecOrigin").split(",")] es.setentityname(index, "player_view_%s"%index) es.server.cmd("es_fire %s player_view_%s kill"%(userid, index)) es.set("wcs_temp_x", view[0]) es.set("wcs_temp_y", view[1]) es.set("wcs_temp_z", view[2])
es.server.queuecmd(command)
« Last Edit: July 24, 2010, 10:42:37 AM by joshtrav »
Logged
« Reply #7 on: July 24, 2010, 10:34:12 AM »
A quick and dirty of what I mean Holliday:
snippit
The if not es.exists("command", "wcs_teleport"): should be if not es.exists("command", "wcs_viewcoord"):?
Logged
I'm watching this topic.  
« Reply #8 on: July 24, 2010, 10:37:13 AM »
Yea, hence the quick and dirty comment.
You would also need to set the loc to a server var. Something like:
es.set("wcs_temp_x", view[0]) es.set("wcs_temp_y", view[1]) es.set("wcs_temp_z", view[2])
Before you do the queuecmd(command)
« Last Edit: July 24, 2010, 10:42:58 AM by joshtrav »
Logged
« Reply #9 on: July 24, 2010, 10:40:08 AM »
Modified to include the last 2 footnotes. Again its a quick and dirty but should do the trick.
Just so you know, it's the es.sexec command which is crashing. If you feel confident in editing the source yourself, you can change all es.sexec commands to es.server.cmd("es_xsexec ...") comands it should work. Otherwise, I'll be releasing a hotfix this weekend (my weekends include mondays as well since Monday is not a work / school day for me  ) -freddukes
Just so you know, it's the es.sexec command which is crashing. If you feel confident in editing the source yourself, you can change all es.sexec commands to es.server.cmd("es_xsexec ...") comands it should work. Otherwise, I'll be releasing a hotfix this weekend (my weekends include mondays as well since Monday is not a work / school day for me )
-freddukes
Will this also include fixes for player filter and other stuff?
Logged
I'm watching this topic.  
Just so you know, it's the es.sexec command which is crashing. If you feel confident in editing the source yourself, you can change all es.sexec commands to es.server.cmd("es_xsexec ...") comands it should work. Otherwise, I'll be releasing a hotfix this weekend (my weekends include mondays as well since Monday is not a work / school day for me )
-freddukes
Just tested this with 40 bots on the method you posted. It returned the same index, and 0 for a few. This is the older version of ES, not July12, can you confirm with accurate testing it is fixed in the newest release?
I tried changing all the es.sexec commands, still not different. :/
Logged
############################### Join my Server and experience a new Mod! Click Or visit superhero-source.com ! ################################
Try the newest version of estcommands.
-freddukes
|