Skocz do zawartości

[RSS] [CS:S] QuickPeek | Observe other players while in-game


Rekomendowane odpowiedzi


This plugin allows you to spectate other players while being alive so your gameplay will not be interrupted.
It can be useful for gamemodes where it's not against the rules to have info on other players' movement.
It can make it more fun in turn-based gamemodes like trikz: oftentimes your gameplay depends on your partner's actions, so it's not that fun having to just wait for the partner to complete some sub-level in an obscured area where you cannot see their progress - and this is exactly what this plugin is to address, i.e. by enabling you to observe their actions first-person.

While peeking, you retain the ability to move, you can switch targets using mouse buttons (+attack/+attack2) and you can see the current target displayed at the bottom half of the screen.
It follows standard interpolation settings, and to reduce latency, set low interp values.

You can take a look at the video to get idea of the plugin:

At the moment, there may be a problem with the sounds while peeking.
Plugin was tested only in CS:S but the concept should work in any other game (may need to update offsets).

Simply place quickpeek.smx and in
addons/sourcemod/plugins and addons/sourcemod/gamedata folders respectively.

It is recommended to set high network rates (especially sv_minupdaterate and sv_maxupdaterate cvars) to improve usability of the plugin.

There are two in-game console commands differing in just their usage:

qpeek - toggle peeking, i.e. you'd stop peeking once you press the corresponding button once more;
+qpeek - start peeking, i.e. the peeking would stop as soon as you release the corresponding button.

It is recommended to bind one of them.

Also, there is additional qpeek angles sub-command to turn on/off turning your player.
It is disabled by default.

Technical Details
This plugin uses replay system that allows you to literally take place of any player by receiving the same frames that were generated for them.

There is sv_maxreplay cvar which determines the number of seconds the engine keeps for replaying.
Since the idea of the plugin is real-time spectating, the plugin, with some excess, sets this cvar to 1.0 and forces to send only the most recent frames.
But in order to drastically change the flow of frames later, need to fully update game information on the client. And it needs to send a lot of packets quickly.
Setting high updaterate will help you to increase speed of this.

Also, we can't send a request for a full update too often, until the current update is completed.
The plugin has an internal mechanism that takes into account ping to cope with it.
I believe there are better options to find out whenther the client is fully updated or not, but this one is enough

Attached Files
File Type: sp Get Plugin or Get Source (quickpeek.sp - 14.6 KB)
File Type: txt (1.1 KB)

Przeczytaj cały wpis na stronie AlliedModders

Odnośnik do komentarza
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.