Valve Developer Community:Reasons for speedy deletion: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 21: Line 21:


The article marked for deletion has value in being a redirect. [[User:Ableitung|Ableitung]] ([[User talk:Ableitung|talk]]) 23:40, 8 December 2023 (PST)
The article marked for deletion has value in being a redirect. [[User:Ableitung|Ableitung]] ([[User talk:Ableitung|talk]]) 23:40, 8 December 2023 (PST)
== Rearview mirror for Source Engine 2013 ==
'''Rearview mirror for Source Engine 2013'''
{{Language subpage}}
'''Зеркало заднего вида (rearview mirror) для Source 2013'''
'''ШАГ - 1'''
Для начала откройте два файла в вашем проекте - '''viewrender.h''' и '''viewrender.cpp'''
В файле - '''viewrender.h''' ищем:
<source lang = cpp>
void DrawMonitors( const CViewSetup &cameraView );
</source>
После вставляем:
<source lang = cpp>
void DrawMirror(const CViewSetup &cameraView);
</source>
Далее в файле - '''viewrender.cpp''' ищем:
<source lang = cpp>
void CViewRender::DrawMonitors( const CViewSetup &cameraView )
{
}
</source>
После вставляем:
<source lang = cpp>
void CViewRender::DrawMirror(const CViewSetup &viewSet)
{
C_BasePlayer *localPlayer = C_BasePlayer::GetLocalPlayer();
if (!localPlayer)
return;
//Copy our current View.
CViewSetup mirrorView = viewSet;
//Get our camera render target.
ITexture *pRenderTarget = GetCameraTexture();
//Our view information, Origin, View Direction, window size
// location on material, and visual ratios.
mirrorView.width = 256;
mirrorView.height = 128;
mirrorView.x = 0;
mirrorView.y = 0;
mirrorView.origin = localPlayer->GetAbsOrigin() + Vector(0, 0, 50 /*50*/);
mirrorView.angles = localPlayer->GetRenderAngles();
mirrorView.angles.x += 30;
mirrorView.angles.y = AngleNormalize(mirrorView.angles.y + 180);
mirrorView.fov = localPlayer->GetFOV();
mirrorView.m_bOrtho = false;
mirrorView.m_flAspectRatio = 1.0f;
Frustum frustum;
//Set the view up and output the scene to our RenderTarget (Camera Material).
render->Push3DView(mirrorView, VIEW_CLEAR_DEPTH | VIEW_CLEAR_COLOR, pRenderTarget, m_Frustum);
ViewDrawScene(false, SKYBOX_2DSKYBOX_VISIBLE, mirrorView, 0, VIEW_MONITOR);
render->PopView(m_Frustum);
}
</source>
'''ШАГ - 2'''
Создадим новый .cpp файл с названием : '''hud_mirror.cpp''' и разместим его в папку '''Client/Source Files/'''
В файл вставляем:
<source lang = cpp>
#include "cbase.h"
#include "hudelement.h"
#include "iclientmode.h"
#include <vgui_controls/ImagePanel.h>
using namespace vgui;
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
//.vmt location + filename
#define IMAGE_MIRROR "mirror.vmt"
//-----------------------------------------------------------------------------
// Purpose: HUD Mirror panel
//-----------------------------------------------------------------------------
class CHudMirror : public CHudElement, public vgui::Panel
{
DECLARE_CLASS_SIMPLE(CHudMirror, vgui::Panel);
public:
CHudMirror(const char *pElementName);
protected:
virtual void Paint();
private:
vgui::ImagePanel *m_Mirror;
};
extern CHud gHUD;
DECLARE_HUDELEMENT(CHudMirror);
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
CHudMirror::CHudMirror(const char *pElementName) : CHudElement(pElementName), vgui::Panel(NULL, "HudMirror")
{
vgui::Panel *pParent = g_pClientMode->GetViewport();
SetParent(pParent); //Our parent is the screen itself.
m_Mirror = new ImagePanel(this, "RearViewMirror");
m_Mirror->SetImage(IMAGE_MIRROR);
SetPaintBackgroundEnabled(false);
}
//-----------------------------------------------------------------------------
// Purpose: Paint
//-----------------------------------------------------------------------------
void CHudMirror::Paint()
{
//Set position Top Right corner
// SetPos(ScreenWidth() - 270, 25);
SetPos(ScreenWidth()/2 - 128, 25); // center
//Set Mirror to 256x128 pixels
m_Mirror->SetSize(256, 96);
m_Mirror->SetVisible(true);
}
</source>
'''ШАГ - 3'''
Далее открываем : scripts/HudLayout.res
И в самом верху добавим:
<source lang = cpp>
HudMirror
{
"wide" "256"
"tall" "128"
"PaintBackgroundType" "1"
}
</source>
'''ШАГ - 4'''
Нам нужно создать mirror.vmt файл и разместить его в : materials/VGUI/
В файл вставим следующий код:
<source lang = cpp>
"UnlitGeneric"
{
"$basetexture" "_rt_Camera"
}
</source>
'''Всё закончили!!!'''
[[File:Sdk vehicles0000.jpg|thumb|right]]
[[File:Sdk vehicles0001.jpg|thumb|right]]
[[File:Sdk vehicles0002.jpg|thumb|right]]

Revision as of 01:28, 29 February 2024

Icon-message-48px.png
This is the discussion page of Valve Developer Community:Reasons for speedy deletion. To add a comment, use the Edit button near the headline of the appropriate section. To create a new section, you can use the Add topic button at the top of this page.
Comments on talk pages should be signed with "~~~~", which will be converted into your signature and a timestamp.
Archived discussions

William's Mod

This has been thoroughly tested on multiple machines, as for the suspected bug where entities of different prefixes can be spawned in "wrong" boxes, this behaviour cannot be seen. Deletions of mod pages on this site should not be done for their obscurity as that is the one of the points of this site.

Please record any behaviour on video before making a claim.-Willgames (talk) 14:59, 30 September 2023 (PST)

How could you not detect it? If I immediately discovered this problem when I first started the mod, not only did I have problems with the fonts (my language is Russian), but all the spawners were simply created “for view”, they only create the appearance that supposedly different entities need to be spawned in different tables , but in fact, you can enter any entity there (for example, weapons table, insert NPC_zombie) and it will spawn. I understand that this is just your inexperience with working with this engine, you can cancel my edits by continuing the orgy of mediocre mods as people like [deleted] can do, I just want to improve this wiki by clearing out the unnecessary amount of mods that really don’t deserve to be there there, at least for now.
This site has certain rules regarding the publication of modifications, namely their content anywhere in the media. Please look at the terms of publication. And your conclusion that any mods can be published needs to be clarified, provide me with evidence, and if you are right, then I admit that I was wrong. And you will cancel my edits without remorse. Maybe.
Also, much of what you listed in the features is either not such, or only half of it. If you change the page to add more documentation about your mod to really see that you've done a lot of work with the engine, adding a scripting system, etc. Perhaps, of course, this will be a strong argument in favor of keeping this mod on the wiki. Yet again.
I currently do not have the opportunity to play any mod, so I cannot reliably show you the errors, at least for now.-NOUG4AT (talk) 07:39, 2 October 2023 (PST)

Source Model Compiler

Testing task fix. TF2CutContent (talk) 23:53, 25 November 2023 (PST)

Goldsrc

Resolved.

The article marked for deletion has value in being a redirect. Ableitung (talk) 23:40, 8 December 2023 (PST)

Rearview mirror for Source Engine 2013

Rearview mirror for Source Engine 2013

English (en)Translate (Translate)

Зеркало заднего вида (rearview mirror) для Source 2013

ШАГ - 1

Для начала откройте два файла в вашем проекте - viewrender.h и viewrender.cpp

В файле - viewrender.h ищем:

void			DrawMonitors( const CViewSetup &cameraView );

После вставляем:

void			DrawMirror(const CViewSetup &cameraView);

Далее в файле - viewrender.cpp ищем:

void CViewRender::DrawMonitors( const CViewSetup &cameraView )
{
}

После вставляем:

void CViewRender::DrawMirror(const CViewSetup &viewSet)
{
	C_BasePlayer *localPlayer = C_BasePlayer::GetLocalPlayer();
	if (!localPlayer)
		return;

	//Copy our current View.
	CViewSetup mirrorView = viewSet;

	//Get our camera render target.
	ITexture *pRenderTarget = GetCameraTexture();

	//Our view information, Origin, View Direction, window size
	// location on material, and visual ratios.
	mirrorView.width = 256;
	mirrorView.height = 128;
	mirrorView.x = 0;
	mirrorView.y = 0;
	mirrorView.origin = localPlayer->GetAbsOrigin() + Vector(0, 0, 50 /*50*/);
	mirrorView.angles = localPlayer->GetRenderAngles();
	mirrorView.angles.x += 30;
	mirrorView.angles.y = AngleNormalize(mirrorView.angles.y + 180);
	mirrorView.fov = localPlayer->GetFOV();
	mirrorView.m_bOrtho = false;
	mirrorView.m_flAspectRatio = 1.0f;

	Frustum frustum;
	//Set the view up and output the scene to our RenderTarget (Camera Material).
	render->Push3DView(mirrorView, VIEW_CLEAR_DEPTH | VIEW_CLEAR_COLOR, pRenderTarget, m_Frustum);

	ViewDrawScene(false, SKYBOX_2DSKYBOX_VISIBLE, mirrorView, 0, VIEW_MONITOR);

	render->PopView(m_Frustum);

}


ШАГ - 2

Создадим новый .cpp файл с названием : hud_mirror.cpp и разместим его в папку Client/Source Files/

В файл вставляем:

#include "cbase.h"
#include "hudelement.h"
#include "iclientmode.h"
#include <vgui_controls/ImagePanel.h>

using namespace vgui;

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

//.vmt location + filename
#define IMAGE_MIRROR "mirror.vmt"

//-----------------------------------------------------------------------------
// Purpose: HUD Mirror panel
//-----------------------------------------------------------------------------
class CHudMirror : public CHudElement, public vgui::Panel
{
	DECLARE_CLASS_SIMPLE(CHudMirror, vgui::Panel);

public:
	CHudMirror(const char *pElementName);

protected:
	virtual void Paint();

private:
	vgui::ImagePanel *m_Mirror;
};

extern CHud gHUD;

DECLARE_HUDELEMENT(CHudMirror);

//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
CHudMirror::CHudMirror(const char *pElementName) : CHudElement(pElementName), vgui::Panel(NULL, "HudMirror")
{
	vgui::Panel *pParent = g_pClientMode->GetViewport();
	SetParent(pParent); //Our parent is the screen itself. 

	m_Mirror = new ImagePanel(this, "RearViewMirror");
	m_Mirror->SetImage(IMAGE_MIRROR);

	SetPaintBackgroundEnabled(false);
}

//-----------------------------------------------------------------------------
// Purpose: Paint
//-----------------------------------------------------------------------------
void CHudMirror::Paint()
{
	//Set position Top Right corner
//	SetPos(ScreenWidth() - 270, 25);	
	SetPos(ScreenWidth()/2 - 128, 25);	//	center

	//Set Mirror to 256x128 pixels
	m_Mirror->SetSize(256, 96);
	m_Mirror->SetVisible(true);
}


ШАГ - 3

Далее открываем : scripts/HudLayout.res И в самом верху добавим:

HudMirror
{
	"wide" "256"
	"tall" "128"
	"PaintBackgroundType" "1"
}

ШАГ - 4

Нам нужно создать mirror.vmt файл и разместить его в : materials/VGUI/ В файл вставим следующий код:

"UnlitGeneric"
{
 "$basetexture" "_rt_Camera"
}

Всё закончили!!!

Sdk vehicles0000.jpg
Sdk vehicles0001.jpg
Sdk vehicles0002.jpg