Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

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


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
QuickPeek

Description
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: https://www.youtube.com/watch?v=ZoUhiFdZ-2g

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).

Installation
Simply place quickpeek.smx and quickpeek.games.txt 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.

Usage
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 quickpeek.games.txt (1.1 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

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

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