Raised This Month: $32 Target: $400
 8% 

No lag nightvision


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay       
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 04-19-2019 , 16:04   No lag nightvision
Reply With Quote #1

A nightvision plugin that does not drop fps, mainly used for DR and KZ servers, but can be used on other mods aswell, not zombie mods though ¯\_(ツ)_/¯
Nightvision has 2 modes: Normal and Fullbright

Spoiler


I've also added a screen fade effect to the nightvision which can be turned off by commenting/removing line 11 (#define SCREEN_FADE).

Original author Fai (BB.O.) (his version requires a player to have nightvision goggles in their inventory).
https://forums.alliedmods.net/showthread.php?p=1681614
Attached Files
File Type: sma Get Plugin or Get Source (nolag_nightvision.sma - 452 views - 1.8 KB)

Last edited by Foxa; 06-17-2020 at 06:03. Reason: added credit to original author in the source code.
Foxa is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 04-20-2019 , 18:27   Re: No lag nightvision
Reply With Quote #2

Nothing special but I like it.

Spoiler
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 04-21-2019 , 06:28   Re: No lag nightvision
Reply With Quote #3

Quote:
Originally Posted by SomewhereLost View Post
Spoiler
Hello.
Foxa is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-01-2019 , 19:01   Re: No lag nightvision
Reply With Quote #4

When you say no lag nightvision you mean standard night vision is unplayable for some people, (not me), or your mod switches nightvision on without delay? I do like how this isn't Counter-Strike specific.

Here is a funny example with somebody running around with stock nightvision on talking about lag.
It did not effect me. Also I was stationary and using their light to shoot. They could not see me. It was completely dark. Still night vision has only helped in my case regardless if I am using it or they are.

Do you have a 3rd person perspective of your night vision?





My FPS increases when things go dark.
Attached Images
File Type: jpg lag-night-vision.jpg (69.4 KB, 776 views)
File Type: jpg lag-night-vision2.jpg (74.3 KB, 739 views)
File Type: jpg lag-night-vision3.jpg (45.1 KB, 723 views)
__________________
DJEarthQuake is offline
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 05-03-2019 , 09:18   Re: No lag nightvision
Reply With Quote #5

Well yeah I probably should've clarified that I've only tested it for CS (don't know if it makes any difference on other games ¯\_(ツ)_/¯), and I called it "No lag nightvision" simply because it doesn't drop my FPS (and I didn't know what else to call it), unlike the default CS nightvision.
I've made it for mods where you would prefer to constantly have 100FPS (deahtrun and kz) - and some maps are really really dark.

Here are some 3rd person screenshots, and the difference it makes for my FPS compared to CS's default nighvision:

Spoiler

Last edited by Foxa; 05-03-2019 at 09:19.
Foxa is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-03-2019 , 12:06   Re: No lag nightvision
Reply With Quote #6

Stick with the unreliable channel IMO for stability and performance.
Code:
message_begin(8, g_msgScreenFade, _, id);

Infrared vision would be refreshing to see.
__________________

Last edited by DJEarthQuake; 05-29-2020 at 11:07.
DJEarthQuake is offline
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 05-03-2019 , 13:44   Re: No lag nightvision
Reply With Quote #7

Well I'm running CS on Pentium G840, with integrated graphics and 2GB of RAM so yeah, FPS drops A LOT.
Yeah, it only works per player, so other players can't see the light, unless they type "nightvision" in the console (or press the nightvision key obviously).
The MSG_ONE being on 1 half and MSG_ONE_UNRELIABLE on the other.. I don't know why I did that..
Changed all MSG_ONE to MSG_ONE_UNRELIABLE

The infrared vision .. yeah no, I've made this because of all the nighvision plugins that I've seen on other servers this one lights up the map and it doesn't drop my FPS. Yeah infrared is cool and all but unnecessary for the mods that it has been tested on (KZ and Deathrun) where you basically turn it on to see where are the blocks that you're supposed to jump on (since as i said some maps are REALLY dark).
Foxa is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-03-2019 , 16:45   Re: No lag nightvision
Reply With Quote #8

Sometimes if you really want to make sure mission critical; msg_one. What is unfortunate is reliable_channel overflows if we have X number people using it Y number of times per second panicking in dark maps.

When using both what is critical and what is not? The fade seems less important than the effect itself. You matched it all now so it is not as remarkable. Initially it seemed backwards as to what is more critical. The fade had MSG_ONE and the vision had MSG_ONE_UNRELIABLE.
__________________

Last edited by DJEarthQuake; 05-29-2020 at 11:05.
DJEarthQuake is offline
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 05-03-2019 , 17:33   Re: No lag nightvision
Reply With Quote #9

Why does it matter if I use MSG_ONE_UNRELIABLE and not 8?? It's literally the same thing.
Foxa is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-03-2019 , 18:22   Re: No lag nightvision
Reply With Quote #10

It's just less typing.
__________________

Last edited by DJEarthQuake; 05-29-2020 at 11:06.
DJEarthQuake is offline
Reply



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 16:32.


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