Page 2 of 2

Re: Snowfall for Black Mesa

Posted: Tue Oct 10, 2017 10:55 pm
by satoon101
The error occurs now because there have been updates to Source.Python where the code in my post will no longer load. However, as Ayuto stated, even if I were to update that code to work with the newest Source.Python, it would still crash the client. I haven't found anything further that is working on any game except for CS:GO.

Re: Snowfall for Black Mesa

Posted: Sat Dec 18, 2021 11:52 am
by cssbestrpg
Hello i just tested the code it seems to work fine now in Cs:s and HL2:DM after i did update the code a bit.

Here is the code the works fine for me in cs:s & hl2:dm

Syntax: Select all

from colors import Color
from entities.constants import WORLD_ENTITY_INDEX, RenderMode
from entities.entity import Entity
from engines.precache import Model
from engines.server import global_vars
from events import Event
from listeners import OnLevelInit
from listeners.tick import Delay


@OnLevelInit
@Event('round_start')
def create_snow(*args):
try:
worldspawn = Entity(WORLD_ENTITY_INDEX)
except ValueError:
Delay(0, create_snow)
return
func_precipitation = Entity.find_or_create("func_precipitation")
func_precipitation.model = Model("maps/{0}.bsp".format(global_vars.map_name))
func_precipitation.precip_type = 3
func_precipitation.color = Color(218, 243, 255)
func_precipitation.render_mode = RenderMode(3)
func_precipitation.spawn()
func_precipitation.mins = worldspawn.world_mins
func_precipitation.maxs = worldspawn.world_maxs
origin = (func_precipitation.mins + func_precipitation.maxs) / 2
func_precipitation.origin = origin

create_snow()

Re: Snowfall for Black Mesa

Posted: Sun Dec 19, 2021 5:48 am
by daren adler
cssbestrpg wrote:Hello i just tested the code it seems to work fine now in Cs:s and HL2:DM after i did update the code a bit.

Here is the code the works fine for me in cs:s & hl2:dm

Syntax: Select all

from colors import Color
from entities.constants import WORLD_ENTITY_INDEX, RenderMode
from entities.entity import Entity
from engines.precache import Model
from engines.server import global_vars
from events import Event
from listeners import OnLevelInit
from listeners.tick import Delay


@OnLevelInit
@Event('round_start')
def create_snow(*args):
try:
worldspawn = Entity(WORLD_ENTITY_INDEX)
except ValueError:
Delay(0, create_snow)
return
func_precipitation = Entity.find_or_create("func_precipitation")
func_precipitation.model = Model("maps/{0}.bsp".format(global_vars.map_name))
func_precipitation.precip_type = 3
func_precipitation.color = Color(218, 243, 255)
func_precipitation.render_mode = RenderMode(3)
func_precipitation.spawn()
func_precipitation.mins = worldspawn.world_mins
func_precipitation.maxs = worldspawn.world_maxs
origin = (func_precipitation.mins + func_precipitation.maxs) / 2
func_precipitation.origin = origin

create_snow()


I did try this plugin and it does not crash the server, but just will not let no one get on (or me) and throws this up at players desktop--> Engine Error

Code: Select all

CUtlList! (exhausted index rande)

Re: Snowfall for Black Mesa

Posted: Sun Dec 19, 2021 10:36 am
by cssbestrpg
Is your server linux? I tested at windows server with newest sp.
For me it worked fine, it did let me go in the server.

Edit:

Tested in css linux server i got that error when i loaded immeadily the plugin, but i got it work when it loads directly from autoexec.cfg

Re: Snowfall for Black Mesa

Posted: Sun Dec 19, 2021 10:25 pm
by daren adler
cssbestrpg wrote:Is your server linux? I tested at windows server with newest sp.
For me it worked fine, it did let me go in the server.

Edit:

Tested in css linux server i got that error when i loaded immeadily the plugin, but i got it work when it loads directly from autoexec.cfg

I tryed it on windows, i have a linux also but did not try on there. i will do the sp update and see. ty.

Re: Snowfall for Black Mesa

Posted: Sun Dec 19, 2021 10:37 pm
by cssbestrpg
daren adler wrote:
cssbestrpg wrote:Is your server linux? I tested at windows server with newest sp.
For me it worked fine, it did let me go in the server.

Edit:

Tested in css linux server i got that error when i loaded immeadily the plugin, but i got it work when it loads directly from autoexec.cfg

I tryed it on windows, i have a linux also but did not try on there. i will do the sp update and see. ty.


Make sure you load the plugin either via server.cfg or autoxec.cfg, those will be executed when you start the server.
When it loads the plugin when the server starts, then it works fine(atleast in css it did)

Re: Snowfall for Black Mesa

Posted: Sun Dec 19, 2021 10:46 pm
by daren adler
Did what you said and still kicks players out and brings that tag on their desktop (CUtlList! (exhausted index rande) and this time it had this on server console and log

Code: Select all

[SP] Successfully loaded plugin 'scoreboard'.
[SP] Loading plugin 'silent_hill'...
[SP] Successfully loaded plugin 'silent_hill'.
[SP] Loading plugin 'snowfall'...
Exception ignored in: <bound method __del__ of <entities._base.Entity object at 0x1D4B4220>>
TypeError: No registered converter was able to extract a C++ pointer to type class CPointer from this Python object of type Entity


Does same thing on linux.

Re: Snowfall for Black Mesa

Posted: Sun Dec 19, 2021 11:12 pm
by cssbestrpg
Try this Build
You need to unzip that build inside of hl2mp folder.
It will suppress that console error you see

Re: Snowfall for Black Mesa

Posted: Mon Dec 20, 2021 1:17 am
by daren adler
cssbestrpg wrote:Try this Build
You need to unzip that build inside of hl2mp folder.
It will suppress that console error you see

Ok i will give it a try. ty. Just gave it a try and still sends players to desktop and shows same as first one, did take away error on server console/log. but still kicks player to desktop and says engine error. ( i was thinking maybe i had to many plugins, so i turned them off and same deal).
Thank you for all the work you are doing, my pc/server can be a real pain sometimes so i think i am done for now on this plugin, like i said my server can be a pain and you got yours to work so i know its my side why it wont work and ill try and see why., thank you.

Re: Snowfall for Black Mesa

Posted: Mon Dec 20, 2021 5:05 am
by L'In20Cible
It will only work on small maps that don't already have a lot of particles. For example, on CS:S it will work on maps such as cs_assault but won't on maps such as de_dust2 (larger, with lot of dust particles builtins, etc.).