add fps camera
This commit is contained in:
parent
81355293e3
commit
843fb8b079
8 changed files with 25 additions and 9 deletions
|
@ -594,6 +594,8 @@ public class Client implements IThreadListener {
|
||||||
private boolean voidParticles = true;
|
private boolean voidParticles = true;
|
||||||
@Variable(name = "draw_void_fog", category = CVarCategory.RENDER, display = "Nebel in der Tiefe")
|
@Variable(name = "draw_void_fog", category = CVarCategory.RENDER, display = "Nebel in der Tiefe")
|
||||||
public boolean voidFog = true;
|
public boolean voidFog = true;
|
||||||
|
@Variable(name = "draw_player_firstperson", category = CVarCategory.RENDER, display = "Spieler in 1. Person")
|
||||||
|
public boolean showPlayerFirstPerson = false;
|
||||||
@Variable(name = "crosshair_size", category = CVarCategory.GUI, min = 0, max = 32, display = "Größe des Fadenkreuzes")
|
@Variable(name = "crosshair_size", category = CVarCategory.GUI, min = 0, max = 32, display = "Größe des Fadenkreuzes")
|
||||||
private int crosshairSize = 6;
|
private int crosshairSize = 6;
|
||||||
@Variable(name = "crosshair_color_notarget", type = IntType.COLOR, category = CVarCategory.GUI, display = "Fadenkreuz-Farbe (ohne Ziel)")
|
@Variable(name = "crosshair_color_notarget", type = IntType.COLOR, category = CVarCategory.GUI, display = "Fadenkreuz-Farbe (ohne Ziel)")
|
||||||
|
|
|
@ -8,10 +8,14 @@ public class GuiGraphics extends GuiOptions {
|
||||||
this.addSelector("draw_downfall_range", 0, 0, 240, 0);
|
this.addSelector("draw_downfall_range", 0, 0, 240, 0);
|
||||||
this.addSelector("draw_rain_particle_range", 242, 0, 240, 0);
|
this.addSelector("draw_rain_particle_range", 242, 0, 240, 0);
|
||||||
|
|
||||||
this.addSelector("crosshair_size", 0, 20, 240, 0);
|
this.addSelector("draw_void_particles", 0, 20, 240, 0);
|
||||||
|
this.addSelector("draw_void_fog", 242, 20, 240, 0);
|
||||||
|
|
||||||
this.addSelector("crosshair_color_notarget", 0, 70, 240, 0);
|
this.addSelector("draw_player_firstperson", 0, 40, 240, 0);
|
||||||
this.addSelector("crosshair_color_target", 242, 70, 240, 0);
|
this.addSelector("crosshair_size", 242, 40, 240, 0);
|
||||||
|
|
||||||
|
this.addSelector("crosshair_color_notarget", 0, 80, 240, 0);
|
||||||
|
this.addSelector("crosshair_color_target", 242, 80, 240, 0);
|
||||||
|
|
||||||
super.init(width, height);
|
super.init(width, height);
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,7 +289,7 @@ public class EntityRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.gm.pointedLiquid = null;
|
this.gm.pointedLiquid = null;
|
||||||
if(this.gm.pointed.type != ObjectType.ENTITY) {
|
if(this.gm.pointed == null || this.gm.pointed.type != ObjectType.ENTITY) {
|
||||||
HitPosition liquid = entity.rayTrace(max, partialTicks, true);
|
HitPosition liquid = entity.rayTrace(max, partialTicks, true);
|
||||||
if(liquid != null && liquid.type == ObjectType.BLOCK && liquid.block != null && this.gm.world.getState(liquid.block).getBlock().getMaterial().isLiquid())
|
if(liquid != null && liquid.type == ObjectType.BLOCK && liquid.block != null && this.gm.world.getState(liquid.block).getBlock().getMaterial().isLiquid())
|
||||||
this.gm.pointedLiquid = liquid.block;
|
this.gm.pointedLiquid = liquid.block;
|
||||||
|
@ -740,7 +740,7 @@ public class EntityRenderer {
|
||||||
|
|
||||||
// boolean flag = this.gm.getRenderViewEntity() instanceof EntityLivingBase && ((EntityLivingBase)this.gm.getRenderViewEntity()).isPlayerSleeping();
|
// boolean flag = this.gm.getRenderViewEntity() instanceof EntityLivingBase && ((EntityLivingBase)this.gm.getRenderViewEntity()).isPlayerSleeping();
|
||||||
|
|
||||||
if (this.gm.thirdPersonView == 0) // && /* !flag && */ !this.gm.hideGUI) // && !this.gm.controller.isSpectator())
|
if (this.gm.thirdPersonView == 0 && !this.gm.showPlayerFirstPerson) // && /* !flag && */ !this.gm.hideGUI) // && !this.gm.controller.isSpectator())
|
||||||
{
|
{
|
||||||
this.enableLightmap();
|
this.enableLightmap();
|
||||||
this.itemRenderer.renderItemInFirstPerson(partialTicks);
|
this.itemRenderer.renderItemInFirstPerson(partialTicks);
|
||||||
|
|
|
@ -573,7 +573,7 @@ public class RenderGlobal
|
||||||
for (int j = 0; j < list.size(); ++j)
|
for (int j = 0; j < list.size(); ++j)
|
||||||
{
|
{
|
||||||
Entity entity3 = list.get(j);
|
Entity entity3 = list.get(j);
|
||||||
if ((entity3 != this.gm.getRenderViewEntity() || this.gm.thirdPersonView != 0) &&
|
if ((entity3 != this.gm.getRenderViewEntity() || this.gm.thirdPersonView != 0 || this.gm.showPlayerFirstPerson) &&
|
||||||
entity3 instanceof EntityLiving && entity3.isInRangeToRender3d(d0, d1, d2) && (entity3.noFrustumCheck || Frustum.isInFrustum(entity3.getEntityBoundingBox()) || entity3.passenger == this.gm.player))
|
entity3 instanceof EntityLiving && entity3.isInRangeToRender3d(d0, d1, d2) && (entity3.noFrustumCheck || Frustum.isInFrustum(entity3.getEntityBoundingBox()) || entity3.passenger == this.gm.player))
|
||||||
{
|
{
|
||||||
// this.renderManager.renderEntity(entity3, partialTicks);
|
// this.renderManager.renderEntity(entity3, partialTicks);
|
||||||
|
@ -633,7 +633,7 @@ public class RenderGlobal
|
||||||
|
|
||||||
if (entity2.posY < (double)(-World.MAX_SIZE_Y) || entity2.posY >= (double)World.MAX_SIZE_Y || this.theWorld.isBlockLoaded(new BlockPos(entity2)))
|
if (entity2.posY < (double)(-World.MAX_SIZE_Y) || entity2.posY >= (double)World.MAX_SIZE_Y || this.theWorld.isBlockLoaded(new BlockPos(entity2)))
|
||||||
{
|
{
|
||||||
if((entity2 != this.gm.getRenderViewEntity() || this.gm.thirdPersonView != 0 /* || flag3 */)) {
|
if((entity2 != this.gm.getRenderViewEntity() || this.gm.thirdPersonView != 0 || this.gm.showPlayerFirstPerson)) {
|
||||||
++this.countEntitiesRendered;
|
++this.countEntitiesRendered;
|
||||||
this.renderManager.renderEntity(entity2, partialTicks);
|
this.renderManager.renderEntity(entity2, partialTicks);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class RenderFish extends Render<EntityHook>
|
||||||
double d2 = entity.angler.prevZ + (entity.angler.posZ - entity.angler.prevZ) * (double)partialTicks + vec3.zCoord;
|
double d2 = entity.angler.prevZ + (entity.angler.posZ - entity.angler.prevZ) * (double)partialTicks + vec3.zCoord;
|
||||||
double d3 = (double)entity.angler.getEyeHeight();
|
double d3 = (double)entity.angler.getEyeHeight();
|
||||||
|
|
||||||
if (this.manager.gm != null && this.manager.gm.thirdPersonView > 0 || entity.angler != Client.CLIENT.player)
|
if (this.manager.gm != null && this.manager.gm.thirdPersonView > 0 || entity.angler != Client.CLIENT.player || this.manager.gm != null && this.manager.gm.showPlayerFirstPerson)
|
||||||
{
|
{
|
||||||
float f9 = (entity.angler.prevYawOffset + (entity.angler.yawOffset - entity.angler.prevYawOffset) * partialTicks) * (float)Math.PI / 180.0F;
|
float f9 = (entity.angler.prevYawOffset + (entity.angler.yawOffset - entity.angler.prevYawOffset) * partialTicks) * (float)Math.PI / 180.0F;
|
||||||
double d4 = (double)ExtMath.sin(f9);
|
double d4 = (double)ExtMath.sin(f9);
|
||||||
|
|
|
@ -112,6 +112,9 @@ public class RenderHumanoid extends RenderNpc
|
||||||
ItemStack itemstack = npc.getHeldItem();
|
ItemStack itemstack = npc.getHeldItem();
|
||||||
modelplayer.setSlim(npc.hasSlimArms()); // .hasSlimSkin());
|
modelplayer.setSlim(npc.hasSlimArms()); // .hasSlimSkin());
|
||||||
modelplayer.setVisible(true);
|
modelplayer.setVisible(true);
|
||||||
|
boolean third = this.manager == null || npc != this.manager.gm.getRenderViewEntity() || this.manager.gm.thirdPersonView != 0 || !this.manager.gm.showPlayerFirstPerson || this.manager.gm.charEditor;
|
||||||
|
modelplayer.bipedHead.showModel &= third;
|
||||||
|
modelplayer.bipedHeadwear.showModel &= third;
|
||||||
// if(npc.isPlayer()) {
|
// if(npc.isPlayer()) {
|
||||||
// modelplayer.bipedHeadwear.showModel &= npc.isWearing(ModelPart.HEAD);
|
// modelplayer.bipedHeadwear.showModel &= npc.isWearing(ModelPart.HEAD);
|
||||||
// modelplayer.bipedBodyWear.showModel &= npc.isWearing(ModelPart.JACKET);
|
// modelplayer.bipedBodyWear.showModel &= npc.isWearing(ModelPart.JACKET);
|
||||||
|
|
|
@ -28,6 +28,12 @@ public class RenderSlime extends RenderNpc
|
||||||
GL11.glScalef(f2 * f, 1.0F / f2 * f, f2 * f);
|
GL11.glScalef(f2 * f, 1.0F / f2 * f, f2 * f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void doRender(EntityNPC entity, double x, double y, double z, float partialTicks)
|
||||||
|
{
|
||||||
|
if(this.manager == null || entity != this.manager.gm.getRenderViewEntity() || this.manager.gm.thirdPersonView != 0 || !this.manager.gm.showPlayerFirstPerson || this.manager.gm.charEditor)
|
||||||
|
super.doRender(entity, x, y, z, partialTicks);
|
||||||
|
}
|
||||||
|
|
||||||
// protected String getEntityTexture(EntityNPC entity)
|
// protected String getEntityTexture(EntityNPC entity)
|
||||||
// {
|
// {
|
||||||
// return entity.getLocationSkin();
|
// return entity.getLocationSkin();
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class RenderSpaceMarine extends RenderNpc
|
||||||
ModelSpaceMarine modelplayer = this.getMainModel();
|
ModelSpaceMarine modelplayer = this.getMainModel();
|
||||||
ItemStack itemstack = npc.getHeldItem();
|
ItemStack itemstack = npc.getHeldItem();
|
||||||
modelplayer.setVisible(true);
|
modelplayer.setVisible(true);
|
||||||
|
modelplayer.bipedHead.showModel &= this.manager == null || npc != this.manager.gm.getRenderViewEntity() || this.manager.gm.thirdPersonView != 0 || !this.manager.gm.showPlayerFirstPerson || this.manager.gm.charEditor;
|
||||||
modelplayer.heldItemLeft = 0;
|
modelplayer.heldItemLeft = 0;
|
||||||
modelplayer.aimedBow = false;
|
modelplayer.aimedBow = false;
|
||||||
modelplayer.isSneak = false;
|
modelplayer.isSneak = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue