Snow (Precipitation)
|
|
|
Nail
|
Дата: Вторник, 19.12.2017, 20:58:58 | Сообщение # 2 |
|
Сообщений: 38
Репутация: 8 [ +/- ]
|
|
There is a plugin. It creates a fake brush entity with mins and max equal to the world ones. And this brush is used as a model for a Func_precipitation entity. It works the way it should, only there are 2 bugs. It's very laggy on most maps (especially when there are a lot of players). And the most unpleasant one - it crashes game-clients. The plugin is called Snowfall, you can get it here: https://forums.alliedmods.net/showthread.php?p=1619374 I have a guess that it works with cubic maps and does not work with concave maps (when part of the brush gets outside the world space). In that case I'd recommend to create multiple brushes to fill the map without getting outside of it. Though it's only my opinion and may not be correct. The best map to test my idea on is zm_kirillconstruction, if use default settings - it crashes clients and causes lags. The simplest way to avoid such problems - create a list of compatible maps and use this plugin only with this maps. You can also edit the map via Hummer editor - add Func_precipitation, than cut it out form *.vmf and recreate in runtime via smx
Сообщение отредактировал Nail - Вторник, 19.12.2017, 21:01:31 |
|
| |
AdabraIM
|
Дата: Среда, 20.12.2017, 17:44:31 | Сообщение # 3 |
|
Сообщений: 32
Репутация: 0 [ +/- ]
|
|
Are you sure that it works on cs:s v34? It didnt work for me and it crashed the server on de_dust2...also on other maps there is no precipitation! Do you know another way of doing this?
|
|
| |
Nail
|
Дата: Четверг, 21.12.2017, 12:14:36 | Сообщение # 4 |
|
Сообщений: 38
Репутация: 8 [ +/- ]
|
|
I see no reason why it shouldn't work with v34...may be some other stuff in the plugin crashes your server. There is a way to create a "snow effect" using particle effects, but it'll take a sizable amount of time to implement. So my idea - spawn snow effect temp entities in front of every player every 1-2 second (this effect is very inertial) . It supposes that the snow particles won't be visible at a distance, so you have to add a dense fog to every map. To make it look less weird I'd also added trace-check to skybox just to no whether a player located outside or at a closed space. Source engine can't handle many particles at a time, so don't make it to dense. You can use info_particle_system instead of TE but it's not the same safe and may cause crashes.
Сообщение отредактировал Nail - Четверг, 21.12.2017, 17:37:12 |
|
| |
AdabraIM
|
Дата: Суббота, 23.12.2017, 19:59:51 | Сообщение # 5 |
|
Сообщений: 32
Репутация: 0 [ +/- ]
|
|
Frankly speaking... I dont know how to write these kinds of plugins Can you possibly do it for me?? I would really appreciate your help Thanks
|
|
| |
Nail
|
Дата: Воскресенье, 24.12.2017, 17:54:45 | Сообщение # 6 |
|
Сообщений: 38
Репутация: 8 [ +/- ]
|
|
I used to write plugins and extensions but gave it up a while ago. I can answer your questions, may be help with advice. To minimize the work you may hook the map engine, it provides virtual interfaces to access the geometry data you need: https://developer.valvesoftware.com/wiki/Valve_Map_Format AFAIR it stores vectors of structures... all You need is to figure out how to get the dimensions of the areas and set up fake brushes into them. For the second option (using particle effects) You may take one of those particle managers form alliedmodders and rewrite it a bit.
Сообщение отредактировал Nail - Воскресенье, 24.12.2017, 17:55:59 |
|
| |