Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2010-07-29 (original capture). Home · Forum · All archived topics · Downloads

Author Topic: Est_GetViewCoord crashing on linux servers?  (Read 191 times)

HOLLIDAY

  • <Race Maker>
  • Moderator
  • Level 7 Expert
  • Posts: 2384
  • Country:
  • of all the things ive lost i miss my mind the most
Est_GetViewCoord crashing on linux servers?
« 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




Volunterrors

  • Level 5 Trained Intermediate
  • Posts: 108
Re: Est_GetViewCoord crashing on linux servers?
« Reply #1 on: July 23, 2010, 04:10:49 AM »
Yes

Icetouch

  • Level 7 Expert
  • Posts: 223
  • Country:
  • FreeTimeCoder
Re: Est_GetViewCoord crashing on linux servers?
« Reply #2 on: July 23, 2010, 09:40:49 AM »
Yep, getViewProp aswell.
###############################
Join my Server and experience a new Mod! Click

Or visit superhero-source.com !
################################

HOLLIDAY

  • <Race Maker>
  • Moderator
  • Level 7 Expert
  • Posts: 2384
  • Country:
  • of all the things ive lost i miss my mind the most
Re: Est_GetViewCoord crashing on linux servers?
« Reply #3 on: July 24, 2010, 06:33:21 AM »
any ideas how to work around this?


Tmu Chuck

  • Level 7 Expert
  • Posts: 305
Re: Est_GetViewCoord crashing on linux servers?
« Reply #4 on: July 24, 2010, 06:51:21 AM »
same here... just wait until they release it
   

joshtrav

  • Level 7 Expert
  • Posts: 186
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« 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 »

joshtrav

  • Level 7 Expert
  • Posts: 186
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« Reply #6 on: July 24, 2010, 10:26:01 AM »
A quick and dirty of what I mean Holliday:

Code: [Select]
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 »

Shidobu

  • WCS Custom Coder
  • Level 7 Expert
  • Posts: 877
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« Reply #7 on: July 24, 2010, 10:34:12 AM »
A quick and dirty of what I mean Holliday:

Code: [Select]
snippit
The if not es.exists("command", "wcs_teleport"): should be if not es.exists("command", "wcs_viewcoord"):?
I'm watching this topic.


joshtrav

  • Level 7 Expert
  • Posts: 186
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« 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:

Code: [Select]
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 »

joshtrav

  • Level 7 Expert
  • Posts: 186
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« 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.

freddukes

  • Level 7 Expert
  • Posts: 326
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« Reply #10 on: July 24, 2010, 05:16:53 PM »
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 :D )

-freddukes

Shidobu

  • WCS Custom Coder
  • Level 7 Expert
  • Posts: 877
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« Reply #11 on: July 26, 2010, 06:56:05 AM »
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 :D )

-freddukes
Will this also include fixes for player filter and other stuff?
I'm watching this topic.


joshtrav

  • Level 7 Expert
  • Posts: 186
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« Reply #12 on: July 26, 2010, 10:20:28 AM »
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 :D )

-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?


Icetouch

  • Level 7 Expert
  • Posts: 223
  • Country:
  • FreeTimeCoder
Re: Est_GetViewCoord crashing on linux servers?
« Reply #13 on: July 27, 2010, 10:35:15 AM »
I tried changing all the es.sexec commands, still not different. :/
###############################
Join my Server and experience a new Mod! Click

Or visit superhero-source.com !
################################

freddukes

  • Level 7 Expert
  • Posts: 326
  • Country:
Re: Est_GetViewCoord crashing on linux servers?
« Reply #14 on: July 27, 2010, 12:30:56 PM »
Try the newest version of estcommands.

-freddukes