#tier0
Explore tagged Tumblr posts
Photo
![Tumblr media](https://64.media.tumblr.com/00e874375c2ff3d344f5224baf093621/16f24bd530fdb505-fa/s540x810/2f203b4eea9e2da5b794abb422a08bde5493cb69.jpg)
表情筋の硬さTier0 カズハのPVよりもクレーとガイアさんのモンド観光ガイドを観たときのほうが興奮してたでござるよ。
256 notes
·
View notes
Photo
![Tumblr media](https://64.media.tumblr.com/e45385c48525afd70a04d932c3de977d/tumblr_p51fuyGQPb1qah4v9o1_540.jpg)
Got Swoosh!? #Nike #SwooshPack #AirForce1 #AF1 #Sail #Pastel #QS #Tier0 #TheShoeGame NiceKicks #Highsnobiety #HSKicks #Hypebeast #HypebeastKicks #Complex #ComplexKicks #ModernNotoriety #NiceKicks #LoveForMyKicks #SoleCollector #SoleToday #HBOutThere #HypeAF #GotKicksDifferentColors #VegasSneakerHeads
#sail#hypeaf#hypebeast#modernnotoriety#tier0#soletoday#nike#swooshpack#loveformykicks#af1#nicekicks#gotkicksdifferentcolors#hboutthere#vegassneakerheads#hskicks#theshoegame#complexkicks#solecollector#qs#airforce1#pastel#hypebeastkicks#highsnobiety#complex
0 notes
Video
youtube
(via https://www.youtube.com/watch?v=S7Cg9SXpRGw)
0 notes
Text
Vêtements Quiksilver Pas Cher
(plus d’infos en effectuant une recherche avec notre module en haut à droite). Également ajout�� au paquet sont trois coureurs plus modernes, la Nike Vêtements Quiksilver Pas Cher. toutes les air jordan est étroitement lié à Run DMC et avait déjà sorti une paire à l’effigie de Jam Master Jay. Toutes les photos sont ICI en bas de la page. Le Nike a été le sujet chaud en ce qui concerne dernière sneaker signature de kobe bryant, mais il y a encore un peu plus coloris fixés à libérer. En plus de la base de accrocheur lumineux, la chaussure est également complétée avec détaillant assis au sommet d'une semelle blanche. Nike chaussures sera mise dans la nouvelle année Vêtements Quiksilver Pas Cher avec leur dernier Nike collection nye femmes qui inclut air jordan retro 11 sky salut. Nous avions déjà parlé de cet hybride mélangeant Nike. nike presto black denim sera bientôt frapper les détaillants cette février. (complex) Nous vous avions déjà parlé ici du programme mêlant des mythes basketball et la. Nous avons d'abord pris un coup d'oeil à la prochaine site officiel jordan think pink de retour en novembre, nous avons maintenant quelques nouvelles photos détaillées à partager. Doté d'un complet noir supérieure avec volt points forts tout au long que vous pouvez maintenant trouver disponible à partir 95soleman sur notre site. jordan cher lux denim est prévue pour débuter cette février avec une marine minuit supérieure avec des accents rouges université. Voici une nouvelle série appelée Concre designée en collaboration avec plusieurs artistes: ERIC ELMS, MADSAKI, ROSTARR ainsi que Dave, ancien skateur et propriétaire du shop Dave’s quality Sacs Quiksilver meat à New York. Par exemple sur les photos de notre ancienne news la languette était différente. Si ces paires ne font pas partie de la gamme Tier0 alors vous les retrouverez surement dans les boutiques qui ont commandé la gamme textile Tech Pack. Pour la rentrée la division streetwear de Nike a concocté des prints tout nouveaux sur des basiques de la marque. Obtenez un meilleur regard en cuir lyon bleu ci-dessous et de regarder pour eux maintenant sur au titolo. www.frquiksilver.com
0 notes
Text
Chaussures De Ski Homme
Nous avons entendu qu'une version d'un de ces jouets serait une couleur bleu exclusivement réservés à la boutique Colette. Nike a confirmé permet aux acheteurs de réserver leur paire préférée pour enlèvement en magasin de leur succursale locale. Si ce modèle est confirmée dans la gamme Tier0 puis Firmament est un nouveau point de chute pour cette gamme de produits. hypebeast Certaines de ces couleurs sont disponibles chez nous mais il semblerait que les Skis Chaussures Vente En Ligne deux premiers sur la photo sontôtous nouveaux.Récemment, les concepteurs de haut de gamme, y compris et, créé leurs versions de la Glass Slipper, qui sera exposé à Saks Fifth Avenue à New York la semaine prochaine. Thx Papoubmx Le créateur de la Nike auront de nouvelles paires dans la gamme qui porte son nom. Highsnobiety QB unit 4 Rue Tiquetonne vous ouvre ses portes pour une soirée de l'inauguration de la boutique le jeudi 24 mai. Ceci est important et de ce soir font partie de quelque chose de significatif. Henson, le spectacle est clair star. Nike a déjà dévoilé ce que James sera port au cours de la Game: une version de son modelée sur la ligne d'horizon de New York, avec une date de libération du 14 février. Il récapitule donc 7 couleurs; blanc, jaune, orange, vert, violet, rose, Equipements De Randonnée Soldes bleu. Oh mon dieu, eh bien, j'aime le soleil Jung, c'est une Wan de mes préférés des concepteurs. Nous étaient sur place pour le grand jour, qui a marqué la réouverture de l'Goring - situé à proximité de Buckingham Palace - après une importante rénovation. Ce livre retrace l'itinéraire de 11 patineurs dans la Mongolie. Pour voir tous les Snowboard Moins Cher moments de style top design, par la galerie.Dans notre septembre doivent acheter problème, FN market plus grandes tendances définies par des éditeurs à regarder pour le printemps: silhouettes classique mélangé avec ornements modernes ainsi que de bloquer les talons, cool-girl mulets, détaillant, blush, strappy chaussure basket kobe bryant colorées, sophistiqué et metallic, styles de globe-trotters, pour n'en nommer que quelques-uns.C'est un impertinent de reconnaître un peu façon Valentine Spirit, mais heureusement, les coeurs, les lèvres et d'autres emblèmes romantique sont une tendance continue pour la saison, comme on l'a vu au Nike. Ainsi le Marketing France Nike a imaginé deux très belles paires de laquelle les couleurs et les matériaux me rappelle bien du savoir-faire et l'empreinte des s américaines. www.fr-ski.com
![Tumblr media](https://64.media.tumblr.com/72bd612a604ceb4c04ea6538e1473840/8c00bb189497fbd9-07/s540x810/07fba7a9a38b3f266d18edcc192eefea4f3f219b.jpg)
0 notes
Text
New Post has been published on シャドウバース攻略速報
New Post has been published on http://xn--shadowverse-e63t796khk9bk11e.com/?p=29528
【シャドバ】RAGE東日本予選ファイナリストの使用デッキが公開!【レシピ】
RAGE東日本予選ファイナリスト使用デッキ公開!
「RAGE Shadowverse Dawnbreak, Nightedge/起源の光、終焉の闇」東日本予選ファイナリスト使用デッキが公開されました!
トーナメント①優勝 NellSee選手
ロイヤル
デッキコードを発行する
ネメシス
デッキコードを発行する
���トップに戻る
トーナメント②優勝 ぺぺ3932選手
ウィッチ
デッキコードを発行する
ドラゴン
デッキコードを発行する
▲トップに戻る
トーナメント③優勝 ゲキカラーズ選手
ドラゴン
デッキコードを発行する
ネメシス
デッキコードを発行する
▲トップに戻る
トーナメント④優勝 麩菓子/Tier0選手
エルフ
デッキコードを発行する
ウィッチ
デッキコードを発行する
▲トップに戻る
トーナメント⑤優勝 かさご選手
エルフ
デッキコードを発行する
ネメシス
デッキコードを発行する
▲トップに戻る
トーナメント⑥優勝 ソルト選手
ドラゴン
デッキコードを発行する
ビショップ
デッキコードを発行する
▲トップに戻る
投稿する
0 notes
Text
#18: HUD Modifications
I've now decided to centralize all vehicle HUD components into a single box. Remove the hud_speed.cpp file
Firstly we need to update our HudAirboatRacer in Resource/HudLayout.res to incorporate positions of our new and existing elements:
"Resource/HudLayout.res" { HudAirboatRacer { "fieldName" "HudAirboatRacer" // Position & Size of HUD box "xpos" "16" "ypos" "362" "wide" "110" "tall" "100" "visible" "1" "enabled" "1" "PaintBackgroundType" "2" // Powerup - Label and Icon "text1_xpos" "8" "text1_ypos" "18" "icon1_xpos" "68" "icon1_ypos" "8" // Lap - Label and numbers "text2_xpos" "8" "text2_ypos" "48" "digit2_xpos" "64" "digit2_ypos" "36" // Speed - Label and numbers "text3_xpos" "8" "text3_ypos" "78" "digit3_xpos" "64" "digit3_ypos" "66" "TextColor" "255 255 255 192" "TextFont" "Default" } }
Then we need to update hud_airboatracer.h we define the new methods we need for hooking into speed method and lap information:
#include "hudelement.h" #include <vgui_controls/Panel.h> using namespace vgui; class CHudAirboatRacer : public CHudElement, public Panel { DECLARE_CLASS_SIMPLE(CHudAirboatRacer, Panel); public: CHudAirboatRacer(const char *pElementName); void togglePrint(); virtual void OnThink(); void Init(void); virtual void ApplySchemeSettings(vgui::IScheme *scheme); virtual void MsgFunc_Powerup(bf_read &msg); virtual void MsgFunc_Lap(bf_read &msg); protected: virtual void Paint(); int m_nPowerup1; int m_nPowerup2; int m_iPowerupType; int m_iSpeed; char m_szLapInfo[256]; CPanelAnimationVar(vgui::HFont, m_hNumberFont, "NumberFont", "HudNumbers"); CPanelAnimationVar(vgui::HFont, m_hTextFont, "TextFont", "Default"); CPanelAnimationVar(Color, m_TextColor, "TextColor", "FgColor"); CPanelAnimationVarAliasType(float, text1_xpos, "text1_xpos", "8", "proportional_float"); CPanelAnimationVarAliasType(float, text1_ypos, "text1_ypos", "10", "proportional_float"); CPanelAnimationVarAliasType(float, icon1_xpos, "icon1_xpos", "64", "proportional_float"); CPanelAnimationVarAliasType(float, icon1_ypos, "icon1_ypos", "10", "proportional_float"); CPanelAnimationVarAliasType(float, text2_xpos, "text2_xpos", "8", "proportional_float"); CPanelAnimationVarAliasType(float, text2_ypos, "text2_ypos", "20", "proportional_float"); CPanelAnimationVarAliasType(float, digit2_xpos, "digit2_xpos", "64", "proportional_float"); CPanelAnimationVarAliasType(float, digit2_ypos, "digit2_ypos", "20", "proportional_float"); CPanelAnimationVarAliasType(float, text3_xpos, "text3_xpos", "8", "proportional_float"); CPanelAnimationVarAliasType(float, text3_ypos, "text3_ypos", "30", "proportional_float"); CPanelAnimationVarAliasType(float, digit3_xpos, "digit3_xpos", "64", "proportional_float"); CPanelAnimationVarAliasType(float, digit3_ypos, "digit3_ypos", "30", "proportional_float"); };
Now our hud_airboatracer.cpp, we hook into the speed and lap information as well as a major update to Paint to position and draw our elements base on data defined in our res file:
#include "hud.h" #include "cbase.h" #include "hud_airboatracer.h" #include "c_prop_vehicle.h" #include "iclientmode.h" #include "hud_macros.h" #include "vgui_controls/controls.h" #include "vgui/ISurface.h" #include "vgui/ILocalize.h" #include <string> #include "tier0/memdbgon.h" using namespace vgui; DECLARE_HUDELEMENT(CHudAirboatRacer); DECLARE_HUD_MESSAGE(CHudAirboatRacer, Powerup); DECLARE_HUD_MESSAGE(CHudAirboatRacer, Lap); static ConVar show_powerup("show_powerup", "1", 0, "toggles powerup"); CHudAirboatRacer::CHudAirboatRacer(const char *pElementName) : CHudElement(pElementName), BaseClass(NULL, "HudAirboatRacer") { Msg("HUD AIRBOAT RACER"); Panel *pParent = g_pClientMode->GetViewport(); SetParent(pParent); SetVisible(false); SetAlpha(255); m_nPowerup1 = surface()->CreateNewTextureID(); surface()->DrawSetTextureFile(m_nPowerup1, "sprites/hud/jumpicon", true, true); m_nPowerup2 = surface()->CreateNewTextureID(); surface()->DrawSetTextureFile(m_nPowerup2, "sprites/hud/nitroicon", true, true); SetHiddenBits(HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT); } void CHudAirboatRacer::ApplySchemeSettings(IScheme *scheme) { BaseClass::ApplySchemeSettings(scheme); } void CHudAirboatRacer::Init(void) { HOOK_HUD_MESSAGE(CHudAirboatRacer, Powerup); HOOK_HUD_MESSAGE(CHudAirboatRacer, Lap); } void CHudAirboatRacer::MsgFunc_Powerup(bf_read &msg) { m_iPowerupType = msg.ReadByte(); Msg("Received Powerup Type: %d\n", m_iPowerupType); } void CHudAirboatRacer::MsgFunc_Lap(bf_read &msg) { msg.ReadString(m_szLapInfo, sizeof(m_szLapInfo)); Msg("Received Lap: %s\n", m_szLapInfo); } void CHudAirboatRacer::OnThink() { C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer(); if (!pPlayer || !pPlayer->IsInAVehicle()) { return; } IClientVehicle *pVehicle = pPlayer->GetVehicle(); C_PropVehicleDriveable *pDrivable = dynamic_cast<C_PropVehicleDriveable*>(pVehicle); m_iSpeed = pDrivable->GetSpeed(); togglePrint(); BaseClass::OnThink(); } void CHudAirboatRacer::Paint() { SetPaintBorderEnabled(false); if (m_iPowerupType) { if (m_iPowerupType == 1) { surface()->DrawSetTexture(m_nPowerup1); } else if (m_iPowerupType == 2) { surface()->DrawSetTexture(m_nPowerup2); } surface()->DrawTexturedRect(icon1_xpos, icon1_ypos, icon1_xpos + 64, icon1_ypos + 64); } std::string sSpeed = std::to_string(m_iSpeed); const char *pszLabelPowerup = "POWERUP", *pszLabelLap = "LAP", *pszLabelSpeed = "SPEED", *pszValueSpeed = sSpeed.c_str(); wchar_t sLabelPowerup[256], sLableLap[256], sLabelSpeed[256]; wchar_t sValueLap[256], sValueSpeed[256]; g_pVGuiLocalize->ConvertANSIToUnicode(pszLabelPowerup, sLabelPowerup, sizeof(sLabelPowerup)); g_pVGuiLocalize->ConvertANSIToUnicode(pszLabelLap, sLableLap, sizeof(sLableLap)); g_pVGuiLocalize->ConvertANSIToUnicode(m_szLapInfo, sValueLap, sizeof(sValueLap)); g_pVGuiLocalize->ConvertANSIToUnicode(pszLabelSpeed, sLabelSpeed, sizeof(sLabelSpeed)); g_pVGuiLocalize->ConvertANSIToUnicode(pszValueSpeed, sValueSpeed, sizeof(sValueSpeed)); // Set text colour Color cColor = m_TextColor; surface()->DrawSetTextColor(cColor[0], cColor[1], cColor[2], cColor[3]); // Powerup Label surface()->DrawSetTextFont(m_hTextFont); surface()->DrawSetTextPos(text1_xpos, text1_ypos); surface()->DrawUnicodeString(sLabelPowerup); // Lap Label surface()->DrawSetTextFont(m_hTextFont); surface()->DrawSetTextPos(text2_xpos, text2_ypos); surface()->DrawUnicodeString(sLableLap); // Lap Number surface()->DrawSetTextFont(m_hNumberFont); surface()->DrawSetTextPos(digit2_xpos, digit2_ypos); surface()->DrawUnicodeString(sValueLap); // Speed Label surface()->DrawSetTextFont(m_hTextFont); surface()->DrawSetTextPos(text3_xpos, text3_ypos); surface()->DrawUnicodeString(sLabelSpeed); // Speed Number surface()->DrawSetTextFont(m_hNumberFont); surface()->DrawSetTextPos(digit3_xpos, digit3_ypos); surface()->DrawUnicodeString(sValueSpeed); } void CHudAirboatRacer::togglePrint() { if (!show_powerup.GetBool()) this->SetVisible(false); else this->SetVisible(true); }
0 notes
Video
youtube
Отсутствует Tier0_s64.dll d3dcompiler_47.dll точка входа не найдена что делать как запустить где скачать d3dcompiler 47 dll Tier0 s64
0 notes
Text
16: Vehicle HUD & Power Ups
Now that we have power ups, speedominter and lap information it's time we create a single vehicle HUD to display everything, rather than have individual HUD items spaced around the screen.
First thing we need to do is copy in the power up icons from the source racer client files. Copy sourceracer\materials\sprites\hud to:
C:\development\halflife2\AirboatRacer\mp\game\mod_hl2mp\materials\sprites\hud
Now go to VS the .h and .cpp files: hud_airboat.h and hud_airboat.cpp in Client / Source Files / AirboatRacer / UI. Now follow the excellent Basic Hud Modification tutorial on Valve and change the references to HudImort to HudAirboat we end up with the following header file:
#include "hudelement.h" #include <vgui_controls> using namespace vgui; class CHudAirboatRacer : public CHudElement, public Panel { DECLARE_CLASS_SIMPLE(CHudAirboatRacer, Panel); public: CHudAirboatRacer(const char *pElementName); void togglePrint(); virtual void OnThink(); protected: virtual void Paint(); int m_nPowerup1; int m_nPowerup2; };
The other changes I made is I created two member variables to how our power up textures. The cpp file should look like this:
#include "hud.h" #include "cbase.h" #include "hud_airboatracer.h" #include "iclientmode.h" #include "hud_macros.h" #include "vgui_controls/controls.h" #include "vgui/ISurface.h" #include "tier0/memdbgon.h" using namespace vgui; DECLARE_HUDELEMENT(CHudAirboatRacer); static ConVar show_powerup("show_powerup", "1", 0, "toggles powerup"); CHudAirboatRacer::CHudAirboatRacer(const char *pElementName) : CHudElement(pElementName), BaseClass(NULL, "HudAirboatRacer") { Panel *pParent = g_pClientMode->GetViewport(); SetParent(pParent); SetVisible(false); SetAlpha(255); m_nPowerup1 = surface()->CreateNewTextureID(); surface()->DrawSetTextureFile(m_nPowerup1, "sprites/hud/jumpicon", true, true); m_nPowerup2 = surface()->CreateNewTextureID(); surface()->DrawSetTextureFile(m_nPowerup2, "sprites/hud/nitroicon", true, true); SetHiddenBits(HIDEHUD_PLAYERDEAD | HIDEHUD_NEEDSUIT); } void CHudAirboatRacer::Paint() { SetPaintBorderEnabled(false); surface()->DrawSetTexture(m_nPowerup1); surface()->DrawTexturedRect(0, 0, 64, 64); surface()->DrawSetTexture(m_nPowerup2); surface()->DrawTexturedRect(64, 0, 128, 64); } void CHudAirboatRacer::togglePrint() { if (!show_powerup.GetBool()) this->SetVisible(false); else this->SetVisible(true); } void CHudAirboatRacer::OnThink() { togglePrint(); BaseClass::OnThink(); }
As you can see in constructor instead of setting up one texture we create two, one for each power up. The paint method has also been updated to paint both for now so we can see they're woring. Now we need to define HudAirboat in Resource/HudLayout.res. I've stripped out all existing hud definitions so we're left with only the two we've added. We'll keep HudSpeed there for now for reference:
"Resource/HudLayout.res" { HudSpeed { "fieldName" "HudSpeed" "xpos" "16" "ypos" "432" "wide" "102" "tall" "36" "visible" "1" "enabled" "1" "PaintBackgroundType" "2" "text_xpos" "8" "text_ypos" "20" "digit_xpos" "50" "digit_ypos" "2" "TextColor" "255 255 255 192" "TextFont" "Default" } HudAirboatRacer { "fieldName" "HudAirboatRacer" "xpos" "16" "ypos" "350" "wide" "102" "tall" "72" "visible" "1" "enabled" "1" "PaintBackgroundType" "2" } }
If you compile/run now you'll see our new HudAirboat box:
You can disable this with the convar: show_powerup 0
Now what we want to do is when a player touches a power up store the power up they have and communicate that to HudAirboat show it can display that icon. I've decided I only want racers to have one power up at a time. To pickup another power up they have to use the one they're holding. To communicate to the HUD you set-up a thing called a HUD message. This allows the engine to send messages to the HUD.
In our hud_airboat.h we declare Init() and MsgFunc_Powerup methods, the MsgFunc_Powerup will handle the messages the HUD receives, these methods must start with MsgFunc_. We also create an int variable to hold what type of power up we have:
#include "hudelement.h" #include <vgui_controls> using namespace vgui; class CHudAirboatRacer : public CHudElement, public Panel { DECLARE_CLASS_SIMPLE(CHudAirboatRacer, Panel); public: CHudAirboatRacer(const char *pElementName); void togglePrint(); virtual void OnThink(); void Init(void); virtual void MsgFunc_Powerup(bf_read &msg); protected: virtual void Paint(); int m_nPowerup1; int m_nPowerup2; int m_iPowerupType; };
Then in hud_airboat.cpp we neen to called the DECLARE_HUD_MESSAGE macro:
DECLARE_HUD_MESSAGE(CHudAirboatRacer, Powerup);
Then we create our new Init method that hooks the Powerup message function to our class and the powerup message function itself that extracts the int that was sent and stores it in our member variable:
void CHudAirboatRacer::Init(void) { HOOK_HUD_MESSAGE(CHudAirboatRacer, Powerup); } void CHudAirboatRacer::MsgFunc_Powerup(bf_read &msg) { m_iPowerupType = msg.ReadByte(); DevMsg("Received Powerup Type: %d\n", m_iPowerupType); }
Now we need to do some work on our power up class CAR_Powerup. First thing we need to do is create private member variable integer array of players that will store what power up a player has and then create a random power up if they don't already have one:
#include "cbase.h" #include "vehicle_base.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" class CAR_Powerup : public CBaseAnimating { public: DECLARE_CLASS(CAR_Powerup, CBaseAnimating); DECLARE_DATADESC(); void Precache(void); void Spawn(void); void PowerupThink(void); virtual void StartTouch(CBaseEntity *pOther); private: int m_iPlayerPowerup[MAX_PLAYERS]; CPropVehicleDriveable *pDrivable; }; LINK_ENTITY_TO_CLASS(race_powerup, CAR_Powerup); BEGIN_DATADESC(CAR_Powerup) DEFINE_ENTITYFUNC(StartTouch), END_DATADESC() void CAR_Powerup::Precache() { BaseClass::Precache(); PrecacheModel("models/pickup/pickup.mdl"); } void CAR_Powerup::Spawn(void) { Precache(); BaseClass::Spawn(); SetModel("models/pickup/pickup.mdl"); ResetSequence(LookupSequence("Idle")); SetThink(&CAR_Powerup::PowerupThink); SetNextThink(gpGlobals->curtime + 0.1f); AddSolidFlags(FSOLID_NOT_SOLID | FSOLID_TRIGGER); VPhysicsInitNormal(SOLID_BBOX, GetSolidFlags(), false); } void CAR_Powerup::PowerupThink() { StudioFrameAdvance(); DispatchAnimEvents(this); SetNextThink(gpGlobals->curtime + 0.1f); } void CAR_Powerup::StartTouch(CBaseEntity *pOther) { if(stricmp(pOther->GetClassname(), "prop_vehicle_airboat") == 0) { DevMsg("POWERUP TOUCH: %s\n", pOther->GetClassname()); pDrivable = dynamic_cast<cpropvehicledriveable>(pOther); if (pDrivable) { // Retrieve driver CBaseEntity *pDriver = pDrivable->GetDriver(); // Retrieve player index int iPlayerIndex = pDriver->entindex() - 1; // Check if they don't already have a power up if (m_iPlayerPowerup[iPlayerIndex] == NULL) { // Give them a random power up m_iPlayerPowerup[iPlayerIndex] = RandomInt(1, 2); DevMsg("POWERUP GIVEN: %d\n", m_iPlayerPowerup[iPlayerIndex]); } } } BaseClass::StartTouch(pOther); }
A quick compile/run driving over a power up now gives you a random power up of either 1 or 2. The need to send the message to the HUD:
// Check if they don't already have a power up if (m_iPlayerPowerup[iPlayerIndex] == NULL) { // Store the driver, to be used later for launching the powerup m_Player[iPlayerIndex] = pDriver; // Give them a random power up m_iPlayerPowerup[iPlayerIndex] = RandomInt(1, 2); // Set message recipient CSingleUserRecipientFilter filter((CBasePlayer *)pDriver); filter.MakeReliable(); // Create message UserMessageBegin(filter, "Powerup"); WRITE_BYTE(m_iPlayerPowerup[iPlayerIndex]); // Send message MessageEnd(); //send message DevMsg("POWERUP GIVEN: %d\n", m_iPlayerPowerup[iPlayerIndex]); }
The Valve tutorial how to send messages to the HUD is HUD Elements. The final thing we need to do is register our power up message with the engine. Search the entire solution for usermessages->Register( "ItemPickup", -1 ) and then in the results open up hl2_usermessages.cpp and and register our messages at the bottom:
usermessages->Register( "Powerup", -1 )
After a compile/run I could see that the message was sent but my message to say it wasn't received didn't show up. I worked out this is because I was using DevMsg on the client which doesn't work, you have to use Msg(). After changing it over I could see it was sent and received.
Now we have to update our CHudRacer::Paint() to show the icon for only the power up we actually have:
void CHudAirboatRacer::Paint() { SetPaintBorderEnabled(false); if (m_iPowerupType) { if (m_iPowerupType == 1) { surface()->DrawSetTexture(m_nPowerup1); } else if (m_iPowerupType == 2) { surface()->DrawSetTexture(m_nPowerup2); } surface()->DrawTexturedRect(0, 0, 64, 64); } }
After a compile/run and driving over the power up only that icon shows. Now to do some work on the powerup class itself CAR_Powerup. First we need to include in_buttons.h because we're going to be checking buttons the player has pressed:
#include "in_buttons.h"
The we need to declare two new methods ExecutePowerup and ExecuteThink. ExecutePowerup will check to see if the player has pressed attack and ExecutePowerup will actually perform the powerup. We also store the player CBaseEntity pointer when they pickup the power up so we don't have to retrieve that:
class CAR_Powerup : public CBaseAnimating { public: DECLARE_CLASS(CAR_Powerup, CBaseAnimating); DECLARE_DATADESC(); void Precache(void); void Spawn(void); void PowerupThink(void); void ExecutePowerup(int iPlayerIndex, CBasePlayer *pBasePlayer); void ExecuteThink(void); virtual void StartTouch(CBaseEntity *pOther); private: int m_iPlayerPowerup[MAX_PLAYERS]; CBaseEntity *m_pPlayer[MAX_PLAYERS]; };
In CAR_Powerup::Spawn() we add a new think event for our power execute to check on each frame:
SetThink(&CAR_Powerup::ExecuteThink); SetNextThink(gpGlobals->curtime);
The set-up the reset code:
void CAR_Powerup::ExecuteThink() { // Loop around each player for (int i = 0; i m_nButtons & IN_ATTACK) { ExecutePowerup(i, pBasePlayer); } } } SetNextThink(gpGlobals->curtime); } void CAR_Powerup::ExecutePowerup(int iPlayerIndex, CBasePlayer *pBasePlayer) { DevMsg("PLAYER %d EXECUTED POWERUP %d\n", iPlayerIndex, m_iPlayerPowerup[iPlayerIndex]); // Retrieve the vehicle the player is in CBaseEntity *pVehicle = pBasePlayer->GetVehicleEntity(); if (pVehicle) { QAngle angPushDir = pVehicle->GetAbsAngles(); // Jump Powerup if (m_iPlayerPowerup[iPlayerIndex] == 1) { angPushDir.y += 90; angPushDir.x -= 15; } // Nitro Powerup else if (m_iPlayerPowerup[iPlayerIndex] == 2) { angPushDir.y += 90; } // Calculate vectors to push to Vector vecAbsDir; AngleVectors(angPushDir, &vecAbsDir); // Push vehicle towards that vector float m_flPushSpeed = 1000; pVehicle->ApplyAbsVelocityImpulse(m_flPushSpeed * vecAbsDir); } // Send message to HUD setting the powerup to -1 // Set message recipient CSingleUserRecipientFilter filter((CBasePlayer *)m_pPlayer[iPlayerIndex]); filter.MakeReliable(); // Create message UserMessageBegin(filter, "Powerup"); WRITE_BYTE(0); // Send message MessageEnd(); //send message // Finished executing the power up now remove the powerup and player from the store m_iPlayerPowerup[iPlayerIndex] = NULL; m_pPlayer[iPlayerIndex] = NULL; }
The explanation for these two methods are detailed in the comments and simply builds on all the things that we've learn't so far.
Git Commit
0 notes
Video
youtube
Отсутствует Tier0_s64.dll d3dcompiler_47.dll точка входа не найдена что делать как запустить где скачать d3dcompiler 47 dll Tier0 s64
0 notes
Text
AHHHHH
So I just got the final post of leaked cards from primal origins.....my deck is officially broken to the max. Bujingi sinyou breaks the deck. Banish from graveyard, turns itself into honest. Holy shit.
0 notes
Text
#15: Power Ups
The original source racer had power ups, their place holders can be seen through the map showing the obsolete icon because they're defined in our .fgd file:
Open up the .fgd file and add in the definition for power ups:
@PointClass base(Targetname, Angles) studio("models/pickup/pickup.mdl") = race_powerup : "Gives player a random powerup." [ ]
Next we need to make sure the power up models are in our models folder copy the models\pickup folder from the source racer client files and copy it into the mod models folder.
Next in Hammer open up our turtlebeach map and click the entity tool and add an entity and change its Class to race_powerup you should then see the animated powerup (You may need to restart Hammer after editing the fgd and copying the models):
The existing powerup entities aren't working though because it looks like they've been decompiled as brush entities by the decompiler. Simply double click on the entity then change to a different class, click apply, change back to race_powerup then click apply to get them working. There are a lot of power ups on this map so it will take some time, I think too many to be honest:
Create the class to handle the race_powerup entity called ar_powerup.cpp:
#include "cbase.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" class CAR_Powerup : public CBaseAnimating { public: DECLARE_CLASS(CAR_Powerup, CBaseAnimating); DECLARE_DATADESC(); void Precache(void); void Spawn(void); void PowerupThink(void); virtual void StartTouch(CBaseEntity *pOther); }; LINK_ENTITY_TO_CLASS(race_powerup, CAR_Powerup); BEGIN_DATADESC(CAR_Powerup) DEFINE_ENTITYFUNC(StartTouch), END_DATADESC() void CAR_Powerup::Precache() { BaseClass::Precache(); PrecacheModel("models/pickup/pickup.mdl"); } void CAR_Powerup::Spawn(void) { Precache(); BaseClass::Spawn(); SetModel("models/pickup/pickup.mdl"); ResetSequence(LookupSequence("Idle")); SetThink(&CAR_Powerup::PowerupThink); SetNextThink(gpGlobals->curtime + 0.1f); AddSolidFlags(FSOLID_NOT_SOLID | FSOLID_TRIGGER); VPhysicsInitNormal(SOLID_BBOX, GetSolidFlags(), false); } void CAR_Powerup::PowerupThink() { StudioFrameAdvance(); DispatchAnimEvents(this); SetNextThink(gpGlobals->curtime + 0.1f); } void CAR_Powerup::StartTouch(CBaseEntity *pOther) { DevMsg("POWERUP START TOUCH TOUCHED\n"); BaseClass::StartTouch(pOther); }
To creaate this class I searched and studied several existing pieces of the SDK. The first issue was the model wasn't visible, I studied CItem_AmmoCrate and copied bits and pieces regarding SetModel, ResetSequence and setting up a think event to animate it.
Then by studying a combination of several classes: C_Gib, CSatchelCharge, CItemSuit and CItem and hours of testing I worked out how to set-up the StartTouch event. The kicker that I was missing until the end was the call to VPhysicsInitNormal without it, it seems Touch events won't work.
After a compile/run your powerups will be visible, animating and responding to the touch event.
Now we need to try and give the airboat a speed boost when it touches a powerup. Firstly we want to make sure this happens when only the airboat touches it:
void CAR_Powerup::StartTouch(CBaseEntity *pOther) { if(stricmp(pOther->GetClassname(), "prop_vehicle_airboat") == 0) { DevMsg("POWERUP TOUCH: %s\n", pOther->GetClassname()); } BaseClass::StartTouch(pOther); }
Now we need to retrieve the vehicle:
void CAR_Powerup::StartTouch(CBaseEntity *pOther) { if(stricmp(pOther->GetClassname(), "prop_vehicle_airboat") == 0) { DevMsg("POWERUP TOUCH: %s\n", pOther->GetClassname()); CBaseServerVehicle *pServerVehicle = dynamic_cast<CBaseServerVehicle *>(pOther->GetServerVehicle()); } BaseClass::StartTouch(pOther); }
It was at this point I remembered that the HL2 jeep had a boost option, so let's search for that and see what we find, if you search for Boost( you'll find CFourWheelVehiclePhysics::SetBoost( float flBoost ). Which I'm assuming if you give it a float value will give the airboat a boost. Now how do we call it from our CBaseServerVehicle instance? Right clicking and looking at call hierarchy shows that it isn't called anywhere in the SDK.
So with no existing examples we'll have to create our own call. Let's see what creates an instance of CFourWheelVehiclePhysics. if you search for **CFourWheelVehiclePhysics *** one of the results is actually in the airboat class:
void CPropAirboat::UpdateGauge() { CFourWheelVehiclePhysics *pPhysics = GetPhysics(); int speed = pPhysics->GetSpeed(); int maxSpeed = pPhysics->GetMaxSpeed(); float speedRatio = clamp( (float)speed / (float)maxSpeed, 0, 1 ); SetPoseParameter( "Gauge", speedRatio ); }
If you see the CPropAirboat class for GetPhysics() it's not a method of this class. Airboat inherits CPropVehicleDriveable:
class CPropAirboat : public CPropVehicleDriveable
And this is class that defines GetPhysics() so we need to create an instance of CPropVehicleDriveable which we can cast from our CBaseServerVehicle instance:
CPropVehicleDriveable *pDrivable = dynamic_cast<CPropVehicleDriveable*>(pServerVehicle);
Now that we have CPropVehicleDriveable instance we can access physics:
CFourWheelVehiclePhysics *pPhysics = pDrivable->GetPhysics();
For now let's just access the speed of the airboat and output it as a DevMsg so putting it all together:
void CAR_Powerup::StartTouch(CBaseEntity *pOther) { if(stricmp(pOther->GetClassname(), "prop_vehicle_airboat") == 0) { DevMsg("POWERUP TOUCH: %s\n", pOther->GetClassname()); CBaseServerVehicle *pServerVehicle = dynamic_cast<CBaseServerVehicle *>(pOther->GetServerVehicle()); CPropVehicleDriveable *pDrivable = dynamic_cast<CPropVehicleDriveable*>(pServerVehicle); if (pServerVehicle) { DevMsg("POWERUP SERVER VEHICLE\n"); if (pDrivable) { DevMsg("POWERUP DRIVABLE VEHICLE\n"); CFourWheelVehiclePhysics *pPhysics = pDrivable->GetPhysics(); int speed = pPhysics->GetSpeed(); DevMsg("SPEED: %d\n", speed); } } } BaseClass::StartTouch(pOther); }
After a compile/run it didn't work, I only saw the messages up to POWERUP SERVER VEHICLE which means our cast from a CBaseServerVehicle to CPropVehicleDriveable didn't work.
Searching the codebase for examples of creating instances of CPropVehicleDriveable (foreach for **CPropVehicleDriveable ***) I found an example of just using the base entity and casting it as one:
CPropVehicleDriveable *CFourWheelServerVehicle::GetFourWheelVehicle( void ) { return (CPropVehicleDriveable *)m_pVehicle; }
So all we need to do is cast our BaseEntity to a CPropVehicleDriveable:
void CAR_Powerup::StartTouch(CBaseEntity *pOther) { if(stricmp(pOther->GetClassname(), "prop_vehicle_airboat") == 0) { DevMsg("POWERUP TOUCH: %s\n", pOther->GetClassname()); CPropVehicleDriveable *pDrivable = dynamic_cast<CPropVehicleDriveable*>(pOther); if (pDrivable) { CFourWheelVehiclePhysics *pPhysics = pDrivable->GetPhysics(); int speed = pPhysics->GetSpeed(); DevMsg("SPEED: %d\n", speed); } } BaseClass::StartTouch(pOther); }
After a compile/run when you drive over a powerup it now tells you your speed! So the process for Source SDK mod development is becoming clearer to me now. Whatever you want to do, first think of a related existing method, search for it, try to understand it, copy and modify it to your needs.
Without know if it would work I then called pPhysics->SetBoost(1000) and gave it a value of 1000 but nothing happened. I think it may have something to do with enabling boost, I search the code for HasBoost() and found this line in CFourWheelVehiclePhysics::Think:
m_nHasBoost = vehicleData.engine.boostDelay;
It determines if boost is enable from the vehicle data which I think comes from the vehicle definition text file (Just a hunch). After search for the vehicle scripts I found CFourWheelVehiclePhysics::Initialize which is passed a vehicle script which then retrieves the data from:
solid_t solid; vehicleparams_t vehicle; if (!ParseVehicleScript( pVehicleScript, solid, vehicle )) { UTIL_Remove(m_pOuter); return false; }
I then tracked this down to CPropVehicle::Spawn( ):
void CPropVehicle::Spawn( ) { CFourWheelServerVehicle *pServerVehicle = dynamic_cast<CFourWheelServerVehicle*>(GetServerVehicle()); m_VehiclePhysics.SetOuter( this, pServerVehicle ); // NOTE: The model has to be set before we can spawn vehicle physics BaseClass::Spawn(); SetCollisionGroup( COLLISION_GROUP_VEHICLE ); m_VehiclePhysics.Spawn(); if (!m_VehiclePhysics.Initialize( STRING(m_vehicleScript), m_nVehicleType )) return; SetNextThink( gpGlobals->curtime ); m_vecSmoothedVelocity.Init(); }
After player around back in my power up code, I attempted to try and get access the data mapped in the physics object for the engine data:
IPhysicsVehicleController *pPhysicsVehicle = pPhysics->GetVehicle(); vehicleparams_t vehicleParams = pPhysicsVehicle->GetVehicleParams(); DevMsg("MAX SPEED: %.2f\n", vehicleParams.engine.maxSpeed);
To my surprise this working but gave me a value of:
MAX SPEED: 598.44
I'm guessing this is pixels per second or something, I then came across this in CFourWheelVehiclePhysics::Think():
float carSpeed = fabs( INS2MPH( carState.speed ) );
Which means that value is inches per second. I then doubled it:
vehicleParams.engine.maxSpeed *= 2;
But it wouldn't store it and each time I drove over the pickup it showed me the doubled amount which means it didn't update the physics object. I then tried as hard as I could do find other ways of updating maxSpeed directly on the member variable itself but couldn't get anywhere. Then I discovered the winning ticket GetVehicleParamsForChange() it's basically what we were doing before but method that allows us to alter the values:
void CAR_Powerup::StartTouch(CBaseEntity *pOther) { if(stricmp(pOther->GetClassname(), "prop_vehicle_airboat") == 0) { DevMsg("POWERUP TOUCH: %s\n", pOther->GetClassname()); CPropVehicleDriveable *pDrivable = dynamic_cast<CPropVehicleDriveable*>(pOther); if (pDrivable) { CFourWheelVehiclePhysics *pPhysics = pDrivable->GetPhysics(); IPhysicsVehicleController *pPhysicsVehicle = pPhysics->GetVehicle(); vehicleparams_t &vehicleParams = pPhysicsVehicle->GetVehicleParamsForChange(); vehicleParams.engine.maxSpeed *= 2; DevMsg("MAX SPEED: %.2f\n", vehicleParams.engine.maxSpeed); } } BaseClass::StartTouch(pOther); }
After a compile/run the Airboat does indeed double its speed but interestly can't go any faster than 64 mph even though I keep collecting pickups. I put this down to friction and horsepower. Friction slows the car down and horsepower is how much grunt the vehicle has, even though its max speed is astronmical after a few pickups it won't even reach that speed if it doesn't have an engine with the power to do it. Max speed is just limit.
I'll post a video showing the speed increase.
0 notes