Patches #1225

Merge in xonotic/xonotic-data.pk3dir.git: tzork/csqc-items

Added by git-manager almost 2 years ago. Updated almost 2 years ago.

Status:ResolvedStart date:05/22/2012
Priority:NormalDue date:
Assignee:tZork% Done:

100%

Category:-
Target version:-

Description

Purpose of the branch:

Move control over model / animations to csqc, implement simple items. (take #2)

Repository: xonotic/xonotic-data.pk3dir.git
Commit: f2756ec48ef7d5c2edebc9bd4885cc753060b2e6
Branch: tzork/csqc-items

Merge commands:

cd data/xonotic-data.pk3dir
git checkout master
git reset --hard origin/master
git pull && git diff 'f2756ec48ef7d5c2edebc9bd4885cc753060b2e6'..'origin/tzork/csqc-items'

# please check that the diff you just saw did not contain anything complex that
# needs a new merge request, and review these changes

git merge --no-ff 'origin/tzork/csqc-items'

# please make sure this merge worked, and if not, fix merge conflicts and git
# commit BEFORE the next command
#
# also, THIS is the point to do final pre-merge testing
#
# use git reset --hard origin/master to bail out

git push && git push --delete origin 'tzork/csqc-items'

Diffstat:

 defaultXonotic.cfg                               |   11 +-
 models/items/a_bullets_simple.iqm                |  Bin 0 -> 476 bytes
 models/items/a_bullets_simple.iqm_0.skin         |    1 +
 models/items/a_bullets_simple.tga                |  Bin 0 -> 49092 bytes
 models/items/a_cells_simple.iqm                  |  Bin 0 -> 476 bytes
 models/items/a_cells_simple.iqm_0.skin           |    1 +
 models/items/a_cells_simple.tga                  |  Bin 0 -> 44243 bytes
 models/items/a_rockets_simple.iqm                |  Bin 0 -> 476 bytes
 models/items/a_rockets_simple.iqm_0.skin         |    1 +
 models/items/a_rockets_simple.tga                |  Bin 0 -> 60161 bytes
 models/items/a_shells_simple.iqm                 |  Bin 0 -> 476 bytes
 models/items/a_shells_simple.iqm_0.skin          |    1 +
 models/items/a_shells_simple.tga                 |  Bin 0 -> 26289 bytes
 models/items/g_h100_simple.iqm                   |  Bin 0 -> 476 bytes
 models/items/g_h100_simple.iqm_0.skin            |    1 +
 models/items/g_h100_simple.tga                   |  Bin 0 -> 8698 bytes
 models/items/g_h1_simple.iqm                     |  Bin 0 -> 476 bytes
 models/items/g_h1_simple.iqm_0.skin              |    1 +
 models/items/g_h1_simple.tga                     |  Bin 0 -> 4030 bytes
 models/items/g_h25_simple.iqm                    |  Bin 0 -> 476 bytes
 models/items/g_h25_simple.iqm_0.skin             |    1 +
 models/items/g_h25_simple.tga                    |  Bin 0 -> 6534 bytes
 models/items/g_h50_simple.iqm                    |  Bin 0 -> 476 bytes
 models/items/g_h50_simple.iqm_0.skin             |    1 +
 models/items/g_h50_simple.tga                    |  Bin 0 -> 7554 bytes
 models/items/g_invincible_simple.iqm             |  Bin 0 -> 476 bytes
 models/items/g_invincible_simple.iqm_0.skin      |    1 +
 models/items/g_invincible_simple.tga             |  Bin 0 -> 151803 bytes
 models/items/g_strength_simple.iqm               |  Bin 0 -> 476 bytes
 models/items/g_strength_simple.iqm_0.skin        |    1 +
 models/items/g_strength_simple.tga               |  Bin 0 -> 126087 bytes
 models/items/item_armor_big_simple.iqm           |  Bin 0 -> 476 bytes
 models/items/item_armor_big_simple.iqm_0.skin    |    1 +
 models/items/item_armor_big_simple.tga           |  Bin 0 -> 7554 bytes
 models/items/item_armor_large_simple.iqm         |  Bin 0 -> 476 bytes
 models/items/item_armor_large_simple.iqm_0.skin  |    1 +
 models/items/item_armor_large_simple.tga         |  Bin 0 -> 22787 bytes
 models/items/item_armor_medium_simple.iqm        |  Bin 0 -> 476 bytes
 models/items/item_armor_medium_simple.iqm_0.skin |    1 +
 models/items/item_armor_medium_simple.tga        |  Bin 0 -> 6534 bytes
 models/items/item_armor_small_simple.iqm         |  Bin 0 -> 476 bytes
 models/items/item_armor_small_simple.iqm_0.skin  |    1 +
 models/items/item_armor_small_simple.tga         |  Bin 0 -> 4030 bytes
 models/weapons/crylink_simple.tga                |  Bin 0 -> 262188 bytes
 models/weapons/g_crylink_simple.iqm              |  Bin 0 -> 476 bytes
 models/weapons/g_crylink_simple.iqm_0.skin       |    1 +
 models/weapons/g_crylink_simple.obj              |   14 +
 models/weapons/g_crylink_simple.tga              |  Bin 0 -> 15499 bytes
 models/weapons/g_electro_simple.iqm              |  Bin 0 -> 476 bytes
 models/weapons/g_electro_simple.iqm_0.skin       |    1 +
 models/weapons/g_electro_simple.tga              |  Bin 0 -> 13568 bytes
 models/weapons/g_gl_simple.iqm                   |  Bin 0 -> 476 bytes
 models/weapons/g_gl_simple.iqm_0.skin            |    1 +
 models/weapons/g_gl_simple.tga                   |  Bin 0 -> 15165 bytes
 models/weapons/g_hagar_simple.iqm                |  Bin 0 -> 476 bytes
 models/weapons/g_hagar_simple.iqm_0.skin         |    1 +
 models/weapons/g_hagar_simple.tga                |  Bin 0 -> 14704 bytes
 models/weapons/g_nex_simple.iqm                  |  Bin 0 -> 476 bytes
 models/weapons/g_nex_simple.iqm_0.skin           |    1 +
 models/weapons/g_nex_simple.tga                  |  Bin 0 -> 9704 bytes
 models/weapons/g_rl_simple.iqm                   |  Bin 0 -> 476 bytes
 models/weapons/g_rl_simple.iqm_0.skin            |    1 +
 models/weapons/g_rl_simple.tga                   |  Bin 0 -> 22873 bytes
 models/weapons/g_shotgun_simple.iqm              |  Bin 0 -> 476 bytes
 models/weapons/g_shotgun_simple.iqm_0.skin       |    1 +
 models/weapons/g_shotgun_simple.tga              |  Bin 0 -> 16408 bytes
 models/weapons/g_uzi_simple.iqm                  |  Bin 0 -> 476 bytes
 models/weapons/g_uzi_simple.iqm_0.skin           |    1 +
 models/weapons/g_uzi_simple.tga                  |  Bin 0 -> 15435 bytes
 qcsrc/client/Main.qc                             |    3 +-
 qcsrc/client/progs.src                           |    1 +
 qcsrc/common/constants.qh                        |    1 +
 qcsrc/server/autocvars.qh                        |    1 -
 qcsrc/server/miscfunctions.qc                    |    6 -
 qcsrc/server/t_items.qc                          |  335 +++++++++++++++---
 scripts/simpleitems.shader                       |  407 ++++++++++++++++++++++
 76 files changed, 741 insertions(+), 60 deletions(-)

Revision log:

commit f2756ec48ef7d5c2edebc9bd4885cc753060b2e6
Merge: 76d2c0f 1e54e22
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Merge remote branch 'origin/master' into tzork/csqc-items

commit 76d2c0fb70bd984c04f4ee8b7b33dd9262e0610f
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Remove a mysterios EF_FLAME that did othing

commit 0909b720b2bc741660ede9041c301555d9661e45
Merge: 69c041b 0f51dde
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Merge remote branch 'origin/master' into tzork/csqc-items

commit 69c041bc170941ec1084714be1969ff5f7550300
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    <merlijn> when you switch to simple items in game, it's pretty much random which items directly go to simple

commit b41f7ee415c9cc35d6304ca237986a9e445ffd4c
Merge: 7f6d1aa 5f5505b
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Merge remote branch 'origin/master' into tzork/csqc-items

commit 7f6d1aa2bb2a2026299341daff4a634ff4b2b7c0
Author: nifrek <nifrek@gmail.com>
Commit: nifrek <nifrek@gmail.com>

    Add shaders for all items, add placeholder models and icons for most items

commit 21f2d617d3cdfd37e4aa0ecc63b9359fff7ac6b0
Merge: 00f75fd 9851767
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Merge remote branch 'origin/master' into tzork/csqc-items

commit 00f75fd083e3ac717cd68f73cc8c1db3c46e8a72
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    fix bboxes reset by model change, dont load models server side (no point)

commit c6466f683b8270a7a56305fbf0e8cc785df8356d
Merge: 737ae27 951578a
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Merge remote branch 'origin/master' into tzork/csqc-items

commit 737ae27e0ab4fbbd4ab8be6b644cd2fc4a165e9c
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    de-tard things so they can be compiled

commit a0555103a19d03835fc8c89d681ee3821c02a142
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Handle drop weapons. server cvar to di/allow simple items, client cvars for fb items. client cvars for g_waypon_stay color/alpha, better powerup effects

commit b3394100881f9df04e740b2270edeef9b492e5fc
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    client cvars to default, exampleXonotic.cfg _simple mode/shader for crylink (needs mod_obj_orientation 1, use md3, dpm or iqm to avoid)

commit 988616c6116192918e86ce93b13ce3469e55f532
Merge: 4cd679f da4435a
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Merge branch 'tzork/csqc-items' of git://de.git.xonotic.org/xonotic/xonotic-data.pk3dir into tzork/csqc-items

    Conflicts:
        qcsrc/server/t_items.qc

commit 4cd679f6f0dd2bc1c0f1dbd92f11f017e383d86b
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    cl_simple_items, neeeds models/foo/bar.ext to have a models/foo/bar_simple.ext to work

commit 94df2d0247b1f0f6644b71e07ce2e2d1abad93a6
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Get rid of g_ghost_items and co, get rid of g_csqc_items, add cl_ghost_items, add secondary animation path (so hp/ar can have a diffrent anim then weapons and powerups

commit da4435ace052085eb1a4109992637aa189af7432
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Get rid of g_ghost_items and co, get rid of g_csqc_items, add cl_ghost_items

commit 6b7e0ec8e9c688d434e50df332d4d06a5d5f1bcd
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Make temporary cvar g_csqc_items set to 0 fully behave as old svqc items did

commit a36965c9f369a2af2cbec1a852f4970e81d5c499
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Use .ItemStatus & ISF_STATUS to control animated, fullbright and so on

commit b0330c124ea7d6fde5cec61ecfb737061faaadd1
Merge: 6cb262c 5de3300
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Merge remote branch 'origin/master' into tzork/csqc-items

commit 6cb262cbb240fb282465fc37a2a8c90193bc5116
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    Only rotate/bob weapons

commit 2cc7eae7ae21a69e08b7755d0a65d30ce9715899
Author: Jakob MG <jakob_mg@hotmail.com>
Commit: Jakob MG <jakob_mg@hotmail.com>

    csqc items (needed for simple items)

User agreed to the GPLv2+.

Diff:

diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg
index 0c399bb..23588af 100644
--- a/defaultXonotic.cfg
+++ b/defaultXonotic.cfg
@@ -1667,9 +1667,6 @@ set g_triggerimpulse_directional_multiplier 1 "trigger_impulse directional field
 set g_triggerimpulse_radial_multiplier 1 "trigger_impulse radial field multiplier" 
 set the_goggles "they do nothing" "but the googles, they do" 

-set g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)" 
-set g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged" 
-
 set sv_weaponstats_file "" "when set to a file name, per-weapon stats get written to that file" 

 seta cl_noantilag 0 "turn this on if you believe antilag is bad" 
@@ -1956,3 +1953,11 @@ alias menu_sync "menu_cmd sync" 

 set sv_join_notices "" 
 set sv_join_notices_time 15
+
+set cl_ghost_items 0.45 "enable ghosted items (when between 0 and 1, overrides the alpha value)" 
+set cl_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged" 
+set sv_simple_items 1 "allow or forbid client use of simple items" 
+set cl_simple_items 0 "enable simple items (if server allows)" 
+set cl_fullbright_items 0 "enable fullbright items (if server allows, controled by g_fullbrightitems)" 
+set cl_staywep_color "2 0.5 0.5" "Color of picked up weapons when g_wepon_stay > 0" 
+set cl_staywep_alpha 0.75 "Alpha of picked up weapons when g_wepon_stay > 0" 
diff --git a/models/items/a_bullets_simple.iqm b/models/items/a_bullets_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/a_bullets_simple.iqm differ
diff --git a/models/items/a_bullets_simple.iqm_0.skin b/models/items/a_bullets_simple.iqm_0.skin
new file mode 100644
index 0000000..4757695
--- /dev/null
+++ b/models/items/a_bullets_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,a_bullets_simple
\ No newline at end of file
diff --git a/models/items/a_bullets_simple.tga b/models/items/a_bullets_simple.tga
new file mode 100644
index 0000000..111a32a
Binary files /dev/null and b/models/items/a_bullets_simple.tga differ
diff --git a/models/items/a_cells_simple.iqm b/models/items/a_cells_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/a_cells_simple.iqm differ
diff --git a/models/items/a_cells_simple.iqm_0.skin b/models/items/a_cells_simple.iqm_0.skin
new file mode 100644
index 0000000..1651991
--- /dev/null
+++ b/models/items/a_cells_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,a_cells_simple
\ No newline at end of file
diff --git a/models/items/a_cells_simple.tga b/models/items/a_cells_simple.tga
new file mode 100644
index 0000000..0f7f1df
Binary files /dev/null and b/models/items/a_cells_simple.tga differ
diff --git a/models/items/a_rockets_simple.iqm b/models/items/a_rockets_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/a_rockets_simple.iqm differ
diff --git a/models/items/a_rockets_simple.iqm_0.skin b/models/items/a_rockets_simple.iqm_0.skin
new file mode 100644
index 0000000..5b2333c
--- /dev/null
+++ b/models/items/a_rockets_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,a_rockets_simple
\ No newline at end of file
diff --git a/models/items/a_rockets_simple.tga b/models/items/a_rockets_simple.tga
new file mode 100644
index 0000000..3d8646b
Binary files /dev/null and b/models/items/a_rockets_simple.tga differ
diff --git a/models/items/a_shells_simple.iqm b/models/items/a_shells_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/a_shells_simple.iqm differ
diff --git a/models/items/a_shells_simple.iqm_0.skin b/models/items/a_shells_simple.iqm_0.skin
new file mode 100644
index 0000000..e3dc44f
--- /dev/null
+++ b/models/items/a_shells_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,a_shells_simple
\ No newline at end of file
diff --git a/models/items/a_shells_simple.tga b/models/items/a_shells_simple.tga
new file mode 100644
index 0000000..a357f50
Binary files /dev/null and b/models/items/a_shells_simple.tga differ
diff --git a/models/items/g_h100_simple.iqm b/models/items/g_h100_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_h100_simple.iqm differ
diff --git a/models/items/g_h100_simple.iqm_0.skin b/models/items/g_h100_simple.iqm_0.skin
new file mode 100644
index 0000000..f8acadd
--- /dev/null
+++ b/models/items/g_h100_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_h100_simple
\ No newline at end of file
diff --git a/models/items/g_h100_simple.tga b/models/items/g_h100_simple.tga
new file mode 100644
index 0000000..08b780a
Binary files /dev/null and b/models/items/g_h100_simple.tga differ
diff --git a/models/items/g_h1_simple.iqm b/models/items/g_h1_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_h1_simple.iqm differ
diff --git a/models/items/g_h1_simple.iqm_0.skin b/models/items/g_h1_simple.iqm_0.skin
new file mode 100644
index 0000000..9532805
--- /dev/null
+++ b/models/items/g_h1_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_h1_simple
\ No newline at end of file
diff --git a/models/items/g_h1_simple.tga b/models/items/g_h1_simple.tga
new file mode 100644
index 0000000..d8bbbc7
Binary files /dev/null and b/models/items/g_h1_simple.tga differ
diff --git a/models/items/g_h25_simple.iqm b/models/items/g_h25_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_h25_simple.iqm differ
diff --git a/models/items/g_h25_simple.iqm_0.skin b/models/items/g_h25_simple.iqm_0.skin
new file mode 100644
index 0000000..0f33bc7
--- /dev/null
+++ b/models/items/g_h25_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_h25_simple
\ No newline at end of file
diff --git a/models/items/g_h25_simple.tga b/models/items/g_h25_simple.tga
new file mode 100644
index 0000000..63593cc
Binary files /dev/null and b/models/items/g_h25_simple.tga differ
diff --git a/models/items/g_h50_simple.iqm b/models/items/g_h50_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_h50_simple.iqm differ
diff --git a/models/items/g_h50_simple.iqm_0.skin b/models/items/g_h50_simple.iqm_0.skin
new file mode 100644
index 0000000..b830541
--- /dev/null
+++ b/models/items/g_h50_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_h50_simple
\ No newline at end of file
diff --git a/models/items/g_h50_simple.tga b/models/items/g_h50_simple.tga
new file mode 100644
index 0000000..a8cbad9
Binary files /dev/null and b/models/items/g_h50_simple.tga differ
diff --git a/models/items/g_invincible_simple.iqm b/models/items/g_invincible_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_invincible_simple.iqm differ
diff --git a/models/items/g_invincible_simple.iqm_0.skin b/models/items/g_invincible_simple.iqm_0.skin
new file mode 100644
index 0000000..6522c88
--- /dev/null
+++ b/models/items/g_invincible_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_invincible_simple
\ No newline at end of file
diff --git a/models/items/g_invincible_simple.tga b/models/items/g_invincible_simple.tga
new file mode 100644
index 0000000..76cb414
Binary files /dev/null and b/models/items/g_invincible_simple.tga differ
diff --git a/models/items/g_strength_simple.iqm b/models/items/g_strength_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/g_strength_simple.iqm differ
diff --git a/models/items/g_strength_simple.iqm_0.skin b/models/items/g_strength_simple.iqm_0.skin
new file mode 100644
index 0000000..bcdad79
--- /dev/null
+++ b/models/items/g_strength_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_strength_simple
\ No newline at end of file
diff --git a/models/items/g_strength_simple.tga b/models/items/g_strength_simple.tga
new file mode 100644
index 0000000..09aa45c
Binary files /dev/null and b/models/items/g_strength_simple.tga differ
diff --git a/models/items/item_armor_big_simple.iqm b/models/items/item_armor_big_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/item_armor_big_simple.iqm differ
diff --git a/models/items/item_armor_big_simple.iqm_0.skin b/models/items/item_armor_big_simple.iqm_0.skin
new file mode 100644
index 0000000..ab88a06
--- /dev/null
+++ b/models/items/item_armor_big_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,item_armor_big_simple
\ No newline at end of file
diff --git a/models/items/item_armor_big_simple.tga b/models/items/item_armor_big_simple.tga
new file mode 100644
index 0000000..7bbd5b4
Binary files /dev/null and b/models/items/item_armor_big_simple.tga differ
diff --git a/models/items/item_armor_large_simple.iqm b/models/items/item_armor_large_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/item_armor_large_simple.iqm differ
diff --git a/models/items/item_armor_large_simple.iqm_0.skin b/models/items/item_armor_large_simple.iqm_0.skin
new file mode 100644
index 0000000..4ae65f3
--- /dev/null
+++ b/models/items/item_armor_large_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,item_armor_large_simple
\ No newline at end of file
diff --git a/models/items/item_armor_large_simple.tga b/models/items/item_armor_large_simple.tga
new file mode 100644
index 0000000..80db5ab
Binary files /dev/null and b/models/items/item_armor_large_simple.tga differ
diff --git a/models/items/item_armor_medium_simple.iqm b/models/items/item_armor_medium_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/item_armor_medium_simple.iqm differ
diff --git a/models/items/item_armor_medium_simple.iqm_0.skin b/models/items/item_armor_medium_simple.iqm_0.skin
new file mode 100644
index 0000000..8f258c1
--- /dev/null
+++ b/models/items/item_armor_medium_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,item_armor_medium_simple
\ No newline at end of file
diff --git a/models/items/item_armor_medium_simple.tga b/models/items/item_armor_medium_simple.tga
new file mode 100644
index 0000000..ed3ce1f
Binary files /dev/null and b/models/items/item_armor_medium_simple.tga differ
diff --git a/models/items/item_armor_small_simple.iqm b/models/items/item_armor_small_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/items/item_armor_small_simple.iqm differ
diff --git a/models/items/item_armor_small_simple.iqm_0.skin b/models/items/item_armor_small_simple.iqm_0.skin
new file mode 100644
index 0000000..50bbb53
--- /dev/null
+++ b/models/items/item_armor_small_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,item_armor_small_simple
\ No newline at end of file
diff --git a/models/items/item_armor_small_simple.tga b/models/items/item_armor_small_simple.tga
new file mode 100644
index 0000000..d8a0f91
Binary files /dev/null and b/models/items/item_armor_small_simple.tga differ
diff --git a/models/weapons/crylink_simple.tga b/models/weapons/crylink_simple.tga
new file mode 100644
index 0000000..4dfe24e
Binary files /dev/null and b/models/weapons/crylink_simple.tga differ
diff --git a/models/weapons/g_crylink_simple.iqm b/models/weapons/g_crylink_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_crylink_simple.iqm differ
diff --git a/models/weapons/g_crylink_simple.iqm_0.skin b/models/weapons/g_crylink_simple.iqm_0.skin
new file mode 100644
index 0000000..e86b8b2
--- /dev/null
+++ b/models/weapons/g_crylink_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_crylink_simple
\ No newline at end of file
diff --git a/models/weapons/g_crylink_simple.obj b/models/weapons/g_crylink_simple.obj
new file mode 100644
index 0000000..3bd17fc
--- /dev/null
+++ b/models/weapons/g_crylink_simple.obj
@@ -0,0 +1,14 @@
+# Blender3D v249 OBJ File: crylink_simple.blend
+# www.blender3d.org
+mtllib g_crylink_simple.mtl
+v 0.000000 40.000000 14.999998
+v 0.000000 10.000001 15.000000
+v 0.000000 9.999999 -15.000000
+v 0.000000 40.000000 -15.000002
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+usemtl crylink_simple
+s off
+f 1/1 4/2 3/3 2/4
diff --git a/models/weapons/g_crylink_simple.tga b/models/weapons/g_crylink_simple.tga
new file mode 100644
index 0000000..f4054b7
Binary files /dev/null and b/models/weapons/g_crylink_simple.tga differ
diff --git a/models/weapons/g_electro_simple.iqm b/models/weapons/g_electro_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_electro_simple.iqm differ
diff --git a/models/weapons/g_electro_simple.iqm_0.skin b/models/weapons/g_electro_simple.iqm_0.skin
new file mode 100644
index 0000000..0ae8f4a
--- /dev/null
+++ b/models/weapons/g_electro_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_electro_simple
\ No newline at end of file
diff --git a/models/weapons/g_electro_simple.tga b/models/weapons/g_electro_simple.tga
new file mode 100644
index 0000000..b523c72
Binary files /dev/null and b/models/weapons/g_electro_simple.tga differ
diff --git a/models/weapons/g_gl_simple.iqm b/models/weapons/g_gl_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_gl_simple.iqm differ
diff --git a/models/weapons/g_gl_simple.iqm_0.skin b/models/weapons/g_gl_simple.iqm_0.skin
new file mode 100644
index 0000000..cbb574d
--- /dev/null
+++ b/models/weapons/g_gl_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_gl_simple
\ No newline at end of file
diff --git a/models/weapons/g_gl_simple.tga b/models/weapons/g_gl_simple.tga
new file mode 100644
index 0000000..e138aa4
Binary files /dev/null and b/models/weapons/g_gl_simple.tga differ
diff --git a/models/weapons/g_hagar_simple.iqm b/models/weapons/g_hagar_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_hagar_simple.iqm differ
diff --git a/models/weapons/g_hagar_simple.iqm_0.skin b/models/weapons/g_hagar_simple.iqm_0.skin
new file mode 100644
index 0000000..2eb9f30
--- /dev/null
+++ b/models/weapons/g_hagar_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_hagar_simple
\ No newline at end of file
diff --git a/models/weapons/g_hagar_simple.tga b/models/weapons/g_hagar_simple.tga
new file mode 100644
index 0000000..4c82e4b
Binary files /dev/null and b/models/weapons/g_hagar_simple.tga differ
diff --git a/models/weapons/g_nex_simple.iqm b/models/weapons/g_nex_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_nex_simple.iqm differ
diff --git a/models/weapons/g_nex_simple.iqm_0.skin b/models/weapons/g_nex_simple.iqm_0.skin
new file mode 100644
index 0000000..55a8cc4
--- /dev/null
+++ b/models/weapons/g_nex_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_nex_simple
\ No newline at end of file
diff --git a/models/weapons/g_nex_simple.tga b/models/weapons/g_nex_simple.tga
new file mode 100644
index 0000000..27c984f
Binary files /dev/null and b/models/weapons/g_nex_simple.tga differ
diff --git a/models/weapons/g_rl_simple.iqm b/models/weapons/g_rl_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_rl_simple.iqm differ
diff --git a/models/weapons/g_rl_simple.iqm_0.skin b/models/weapons/g_rl_simple.iqm_0.skin
new file mode 100644
index 0000000..bcb054e
--- /dev/null
+++ b/models/weapons/g_rl_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_rl_simple
\ No newline at end of file
diff --git a/models/weapons/g_rl_simple.tga b/models/weapons/g_rl_simple.tga
new file mode 100644
index 0000000..d65fa87
Binary files /dev/null and b/models/weapons/g_rl_simple.tga differ
diff --git a/models/weapons/g_shotgun_simple.iqm b/models/weapons/g_shotgun_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_shotgun_simple.iqm differ
diff --git a/models/weapons/g_shotgun_simple.iqm_0.skin b/models/weapons/g_shotgun_simple.iqm_0.skin
new file mode 100644
index 0000000..3721ffc
--- /dev/null
+++ b/models/weapons/g_shotgun_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_shotgun_simple
\ No newline at end of file
diff --git a/models/weapons/g_shotgun_simple.tga b/models/weapons/g_shotgun_simple.tga
new file mode 100644
index 0000000..37da2f8
Binary files /dev/null and b/models/weapons/g_shotgun_simple.tga differ
diff --git a/models/weapons/g_uzi_simple.iqm b/models/weapons/g_uzi_simple.iqm
new file mode 100644
index 0000000..a5cc3e6
Binary files /dev/null and b/models/weapons/g_uzi_simple.iqm differ
diff --git a/models/weapons/g_uzi_simple.iqm_0.skin b/models/weapons/g_uzi_simple.iqm_0.skin
new file mode 100644
index 0000000..043974b
--- /dev/null
+++ b/models/weapons/g_uzi_simple.iqm_0.skin
@@ -0,0 +1 @@
+Plane,g_uzi_simple
\ No newline at end of file
diff --git a/models/weapons/g_uzi_simple.tga b/models/weapons/g_uzi_simple.tga
new file mode 100644
index 0000000..d9b5df4
Binary files /dev/null and b/models/weapons/g_uzi_simple.tga differ
diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc
index 6072652..3ac1e9c 100644
--- a/qcsrc/client/Main.qc
+++ b/qcsrc/client/Main.qc
@@ -87,7 +87,7 @@ void ConsoleCommand_macro_init();
 void CSQC_Init(void)
 {
     prvm_language = cvar_string("prvm_language");
-
+    cl_simple_items = autocvar_cl_simple_items;
 #ifdef USE_FTE
 #pragma target ID
     __engine_check = checkextension("DP_SV_WRITEPICTURE");
@@ -767,6 +767,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
         case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break;
         case ENT_CLIENT_TURRET: ent_turret(); break; 
         case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break; 
+        case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break;  
         default:
             //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
             error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));
diff --git a/qcsrc/client/progs.src b/qcsrc/client/progs.src
index d3a3a07..a0b4826 100644
--- a/qcsrc/client/progs.src
+++ b/qcsrc/client/progs.src
@@ -53,6 +53,7 @@ projectile.qh
 sortlist.qc
 miscfunctions.qc
 teamplay.qc
+../server/t_items.qc

 teamradar.qc
 hud_config.qc
diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh
index d014925..13d3115 100644
--- a/qcsrc/common/constants.qh
+++ b/qcsrc/common/constants.qh
@@ -97,6 +97,7 @@ const float ENT_CLIENT_ACCURACY = 30;
 const float ENT_CLIENT_SHOWNAMES = 31;
 const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
 const float ENT_CLIENT_MODEL = 33;
+const float ENT_CLIENT_ITEM = 34;

 const float ENT_CLIENT_TURRET = 40;
 const float ENT_CLIENT_AUXILIARYXHAIR = 50;
diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh
index 5e1c65f..0cfdec5 100644
--- a/qcsrc/server/autocvars.qh
+++ b/qcsrc/server/autocvars.qh
@@ -809,7 +809,6 @@ float autocvar_g_freezetag_warmup;
 float autocvar_g_full_getstatus_responses;
 float autocvar_g_fullbrightitems;
 float autocvar_g_fullbrightplayers;
-string autocvar_g_ghost_items_color;
 #define autocvar_g_grappling_hook cvar("g_grappling_hook")
 float autocvar_g_grappling_hook_tarzan;
 float autocvar_g_hitplots;
diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc
index 3826b68..25b4282 100644
--- a/qcsrc/server/miscfunctions.qc
+++ b/qcsrc/server/miscfunctions.qc
@@ -772,7 +772,6 @@ float warmup_start_ammo_fuel;
 float warmup_start_health;
 float warmup_start_armorvalue;
 float g_weapon_stay;
-float g_ghost_items;

 entity get_weaponinfo(float w);

@@ -1249,11 +1248,6 @@ void readlevelcvars(void)
     if(!g_weapon_stay)
         g_weapon_stay = cvar("g_weapon_stay");

-    g_ghost_items = cvar("g_ghost_items");
-
-    if(g_ghost_items >= 1)
-        g_ghost_items = 0.25; // default alpha value
-
     if not(inWarmupStage && !g_ca)
         game_starttime = cvar("g_start_delay");

diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc
index ac029e6..35eaad6 100644
--- a/qcsrc/server/t_items.qc
+++ b/qcsrc/server/t_items.qc
@@ -1,3 +1,232 @@
+#define ISF_LOCATION 2
+#define ISF_MODEL    4
+#define ISF_STATUS   8
+    #define ITS_STAYWEP   1
+    #define ITS_ANIMATE1  2
+    #define ITS_ANIMATE2  4
+    #define ITS_AVAILABLE 8
+    #define ITS_ALLOWFB   16
+    #define ITS_ALLOWSI   32
+    #define ITS_POWERUP   64
+#define ISF_COLORMAP 16
+#define ISF_DROP 32
+
+.float ItemStatus;
+
+#ifdef CSQC
+
+float  autocvar_cl_ghost_items;
+vector autocvar_cl_ghost_items_color;
+float  autocvar_cl_fullbright_items;
+vector autocvar_cl_staywep_color;
+float  autocvar_cl_staywep_alpha;
+float  autocvar_cl_simple_items;
+float  cl_simple_items;
+
+.float  spawntime;
+.float  gravity;
+.vector colormod;
+void ItemDraw()
+{    
+    if(self.ItemStatus & ITS_ANIMATE1)
+    {
+        self.angles += '0 180 0' * frametime;
+        setorigin(self, '0 0 10' + self.oldorigin + '0 0 8' * sin(time * 2));        
+    }    
+    
+    if(self.ItemStatus & ITS_ANIMATE2)
+    {
+        self.angles += '0 -90 0' * frametime;
+        setorigin(self, '0 0 8' + self.oldorigin + '0 0 4' * sin(time * 3));        
+    }
+    
+    if(self.gravity)
+        Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
+}
+
+void ItemDrawSimple()
+{
+    if(self.gravity)
+        Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);    
+}
+
+float csqcitems_started; // remove this after a release or two
+void csqcitems_start()
+{
+    autocvar_cl_ghost_items =  bound(0, autocvar_cl_ghost_items, 1);
+    if(autocvar_cl_ghost_items == 1)
+        autocvar_cl_ghost_items = 0.55;
+    
+    string _tmp = cvar_string("cl_ghost_items_color");
+    if(_tmp == "")
+        autocvar_cl_ghost_items_color = '-1 -1 -1';
+
+    csqcitems_started = TRUE;
+}
+
+void ItemRead(float _IsNew)
+{
+    if(!csqcitems_started)
+        csqcitems_start();
+    
+    float sf = ReadByte();
+
+    if(sf & ISF_LOCATION)
+    {
+        self.origin_x = ReadCoord();
+        self.origin_y = ReadCoord();
+        self.origin_z = ReadCoord();
+        setorigin(self, self.origin);
+        self.oldorigin = self.origin;
+    }
+    
+    if(sf & ISF_STATUS) // need to read/write status frist so model can handle simple, fb etc.
+    {
+        self.ItemStatus = ReadByte();    
+        
+        if(self.ItemStatus & ITS_AVAILABLE)
+        {
+            self.alpha = 1;
+            self.colormod = self.glowmod = '1 1 1';
+        }
+        else
+        {
+            if (autocvar_cl_ghost_items)
+            {
+                self.alpha = autocvar_cl_ghost_items;
+                self.colormod = self.glowmod = autocvar_cl_ghost_items_color;
+            }
+            else
+                self.alpha = -1;
+        }    
+        
+        if(autocvar_cl_fullbright_items)
+            if(self.ItemStatus & ITS_ALLOWFB)
+                self.effects |= EF_FULLBRIGHT;
+            
+        if(self.ItemStatus & ITS_STAYWEP)
+        {
+            self.colormod = self.glowmod = autocvar_cl_staywep_color;
+            self.alpha = autocvar_cl_staywep_alpha;
+            
+        }
+        
+        if(self.ItemStatus & ITS_POWERUP)
+        {
+            if(self.ItemStatus & ITS_AVAILABLE)
+                self.effects |= (EF_ADDITIVE | EF_FULLBRIGHT);
+            else
+                 self.effects &~= (EF_ADDITIVE | EF_FULLBRIGHT);
+        }
+    }
+    
+    if(sf & ISF_MODEL)
+    {
+        self.drawmask  = MASK_NORMAL;
+        self.movetype  = MOVETYPE_NOCLIP;
+        
+        if(self.mdl)
+            strunzone(self.mdl);
+        
+        self.mdl = "";
+        string _fn = ReadString();
+        
+        if(cl_simple_items && (self.ItemStatus & ITS_ALLOWSI))
+        {
+            string _fn2 = substring(_fn, 0 , strlen(_fn) -4);
+                        
+            if(fexists(strcat(_fn2, "_simple.md3")))
+                self.mdl = strzone(strcat(_fn2, "_simple.md3"));
+            else if(fexists(strcat(_fn2, "_simple.dpm")))
+                self.mdl = strzone(strcat(_fn2, "_simple.dpm"));
+            else if(fexists(strcat(_fn2, "_simple.iqm")))
+                self.mdl = strzone(strcat(_fn2, "_simple.iqm"));
+            else if(fexists(strcat(_fn2, "_simple.obj")))
+                self.mdl = strzone(strcat(_fn2, "_simple.obj"));
+            else
+            {
+                self.mdl = "";
+                dprint("Simple item requested for ", _fn, " but no model exsist for it\n");
+            }
+        }
+        
+        if(self.mdl == "")
+        {
+            self.mdl       = strzone(_fn);
+            self.draw      = ItemDraw;
+        }
+        else
+            self.draw      = ItemDrawSimple;
+        
+        precache_model(self.mdl);
+        setmodel(self, self.mdl);
+    }
+    
+    if(sf & ISF_COLORMAP)
+        self.colormap = ReadShort();
+    
+    if(sf & ISF_DROP)
+    {
+        self.gravity = 1;
+        self.move_movetype = MOVETYPE_TOSS;
+        self.move_velocity_x = ReadCoord();
+        self.move_velocity_y = ReadCoord();
+        self.move_velocity_z = ReadCoord();
+        self.velocity = self.move_velocity;
+        self.move_origin = self.oldorigin;
+        
+        if(!self.move_time)
+        {
+            self.move_time = time;
+            self.spawntime = time;
+        }
+        else
+            self.move_time = max(self.move_time, time);
+    }    
+}
+#endif
+
+#ifdef SVQC
+float autocvar_sv_simple_items;
+float ItemSend(entity to, float sf)
+{
+    if(self.gravity)
+        sf |= ISF_DROP;
+    else
+        sf &~= ISF_DROP;
+    
+    WriteByte(MSG_ENTITY, ENT_CLIENT_ITEM);    
+    WriteByte(MSG_ENTITY, sf);
+
+        
+    //WriteByte(MSG_ENTITY, self.cnt);
+    if(sf & ISF_LOCATION)
+    {
+        WriteCoord(MSG_ENTITY, self.origin_x);
+        WriteCoord(MSG_ENTITY, self.origin_y);
+        WriteCoord(MSG_ENTITY, self.origin_z);
+    }
+
+    if(sf & ISF_STATUS)
+        WriteByte(MSG_ENTITY, self.ItemStatus);
+
+    if(sf & ISF_MODEL)
+        WriteString(MSG_ENTITY, self.mdl);
+        
+    if(sf & ISF_COLORMAP)
+        WriteShort(MSG_ENTITY, self.colormap);
+
+    if(sf & ISF_DROP)
+    {
+        WriteCoord(MSG_ENTITY, self.velocity_x);
+        WriteCoord(MSG_ENTITY, self.velocity_y);
+        WriteCoord(MSG_ENTITY, self.velocity_z);
+    }
+        
+    return TRUE;
+}
+
+
 float have_pickup_item(void)
 {
     // minstagib: only allow filtered items
@@ -78,7 +307,7 @@ string Item_CounterFieldName(float it)

 .float max_armorvalue;
 .float pickup_anyway;
-
+/*
 float Item_Customize()
 {
     if(self.spawnshieldtime)
@@ -103,80 +332,63 @@ float Item_Customize()
             return FALSE;
     }
 }
+*/

 void Item_Show (entity e, float mode)
 {
     e.effects &~= EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST;
+    e.ItemStatus &~= ITS_STAYWEP;
     if (mode > 0)
     {
         // make the item look normal, and be touchable
         e.model = e.mdl;
         e.solid = SOLID_TRIGGER;
-        e.colormod = '0 0 0';
-        self.glowmod = self.colormod;
-        e.alpha = 0;
-        e.customizeentityforclient = func_null;
-
         e.spawnshieldtime = 1;
+        e.ItemStatus |= ITS_AVAILABLE;
     }
     else if (mode < 0)
     {
         // hide the item completely
         e.model = string_null;
         e.solid = SOLID_NOT;
-        e.colormod = '0 0 0';
-        self.glowmod = self.colormod;
-        e.alpha = 0;
-        e.customizeentityforclient = func_null;
-
         e.spawnshieldtime = 1;
+        e.ItemStatus &~= ITS_AVAILABLE;
     }
     else if((e.flags & FL_WEAPON) && !(e.flags & FL_NO_WEAPON_STAY) && g_weapon_stay)
     {
         // make the item translucent and not touchable
         e.model = e.mdl;
         e.solid = SOLID_TRIGGER; // can STILL be picked up!
-        e.colormod = '0 0 0';
-        self.glowmod = self.colormod;
         e.effects |= EF_STARDUST;
-        e.customizeentityforclient = Item_Customize;
-
         e.spawnshieldtime = 0; // field indicates whether picking it up may give you anything other than the weapon
-    }
-    else if(g_ghost_items)
-    {
-        // make the item translucent and not touchable
-        e.model = e.mdl;
-        e.solid = SOLID_NOT;
-        e.colormod = stov(autocvar_g_ghost_items_color);
-        e.glowmod = e.colormod;
-        e.alpha = g_ghost_items;
-        e.customizeentityforclient = func_null;
-
-        e.spawnshieldtime = 1;
+        e.ItemStatus |= (ITS_AVAILABLE | ITS_STAYWEP);
     }
     else
     {
-        // hide the item completely
-        e.model = string_null;
+        //setmodel(e, "null");
         e.solid = SOLID_NOT;
         e.colormod = '0 0 0';
         e.glowmod = e.colormod;
-        e.alpha = 0;
-        e.customizeentityforclient = func_null;
-
         e.spawnshieldtime = 1;
+        e.ItemStatus &~= ITS_AVAILABLE;
     }

-    if (e.items & (IT_STRENGTH | IT_INVINCIBLE))
-        e.effects |= EF_ADDITIVE | EF_FULLBRIGHT;
+    if (e.items & IT_STRENGTH || e.items & IT_INVINCIBLE)
+        e.ItemStatus |= ITS_POWERUP;            
+    
     if (autocvar_g_nodepthtestitems)
         e.effects |= EF_NODEPTHTEST;
+        
+    
     if (autocvar_g_fullbrightitems)
-        e.effects |= EF_FULLBRIGHT;
+        e.ItemStatus |= ITS_ALLOWFB;
+    
+    if (autocvar_sv_simple_items)
+        e.ItemStatus |= ITS_ALLOWSI;

     // relink entity (because solid may have changed)
     setorigin(e, e.origin);
+    e.SendFlags |= ISF_STATUS;
 }

 void Item_Respawn (void)
@@ -555,6 +767,7 @@ void Item_Touch (void)
                 }
             }
             e = RandomSelection_chosen_ent;
+
         }
         else
             e = self;
@@ -745,8 +958,10 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,

     if(self.model == "")
         self.model = itemmodel;
+    
     if(self.item_pickupsound == "")
         self.item_pickupsound = pickupsound;
+    
     if(!self.respawntime) // both need to be set
     {
         self.respawntime = defaultrespawntime;
@@ -758,6 +973,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,

     if(weaponid)
         WEPSET_COPY_EW(self, weaponid);
+    
     self.flags = FL_ITEM | itemflags;

     if(MUTATOR_CALLHOOK(FilterItem)) // error means we do not want the item
@@ -858,6 +1074,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
             entity otheritem;
             for(otheritem = findradius(self.origin, 3); otheritem; otheritem = otheritem.chain)
             {
+                // why not flags & fl_item?
                 if(otheritem.is_item)
                 {
                     dprint("XXX Found duplicated item: ", itemname, vtos(self.origin));
@@ -891,32 +1108,51 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
     self.mdl = self.model;
     self.netname = itemname;
     self.touch = Item_Touch;
-    setmodel (self, self.mdl); // precision set below
-    self.effects |= EF_LOWPRECISION;
+    setmodel(self, "null"); // precision set below
+    //self.effects |= EF_LOWPRECISION; 
+    
     if((itemflags & FL_POWERUP) || self.health || self.armorvalue)
-        setsize (self, '-16 -16 0', '16 16 48');
+    {
+        self.pos1 = '-16 -16 0';
+        self.pos2 = '16 16 48';
+    }
     else
-        setsize (self, '-16 -16 0', '16 16 32');
-    if(itemflags & FL_WEAPON)
-        self.modelflags |= MF_ROTATE;
+    {
+        self.pos1 = '-16 -16 0';
+        self.pos2 = '16 16 32';
+    }
+    setsize (self, self.pos1, self.pos2);

-    if (self.classname != "droppedweapon") // if dropped, colormap is already set up nicely
-    if (itemflags & FL_WEAPON)
+    if(itemflags & FL_POWERUP) 
+        self.ItemStatus |= ITS_ANIMATE1;
+    
+    if(self.armorvalue || self.health)
+        self.ItemStatus |= ITS_ANIMATE2;
+    
+    if(itemflags & FL_WEAPON)
     {
-        // neutral team color for pickup weapons
+        if (self.classname != "droppedweapon") // if dropped, colormap is already set up nicely
         self.colormap = 1024; // color shirt=0 pants=0 grey
+        else
+            self.gravity = 1;
+            
+        self.ItemStatus |= ITS_ANIMATE1;
+        self.ItemStatus |= ISF_COLORMAP;
     }

     self.state = 0;
-    if(self.team)
+    if(self.team) // broken, no idea why.
     {
         if(!self.cnt)
             self.cnt = 1; // item probability weight
-        self.effects = self.effects | EF_NODRAW; // marker for item team search
+            
+        self.effects |= EF_NODRAW; // marker for item team search
         InitializeEntity(self, Item_FindTeam, INITPRIO_FINDTARGET);
     }
     else
         Item_Reset();
+        
+    Net_LinkEntity(self, FALSE, 0, ItemSend);
 }

 /* replace items in minstagib
@@ -924,10 +1160,10 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
  * IT_NAILS     = extra lives
  * IT_INVINCIBLE = speed
  */
-void minstagib_items (float itemid)
+void minstagib_items (float itemid) // will be deleted soon.
 {
     float rnd;
-    self.classname = "minstagib";
+    self.classname = "minstagib"; // ...?

     // replace rocket launchers and nex guns with ammo cells
     if (itemid == IT_CELLS)
@@ -1355,7 +1591,7 @@ void spawnfunc_item_invincible (void) {
 void spawnfunc_item_minst_cells (void) {
     if (g_minstagib)
     {
-        minst_no_auto_cells = 1;
+        minst_no_auto_cells = TRUE;
         minstagib_items(IT_CELLS);
     }
     else
@@ -1871,3 +2107,4 @@ float GiveItems(entity e, float beginarg, float endarg)

     return got;
 }
+#endif
diff --git a/scripts/simpleitems.shader b/scripts/simpleitems.shader
new file mode 100644
index 0000000..abaab42
--- /dev/null
+++ b/scripts/simpleitems.shader
@@ -0,0 +1,407 @@
+////////// AMMO //////////
+
+a_cells_simple // cells
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/a_cells_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+a_rockets_simple // rockets
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/a_rockets_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+a_bullets_simple // bullets
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/a_bullets_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+a_shells_simple // shells
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/a_shells_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+////////// WEAPONS //////////
+
+g_crylink_simple // crylink
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_crylink_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_electro_simple // electro
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_electro_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_nex_simple // nex
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_nex_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_hagar_simple // hagar
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_hagar_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_gl_simple // mortar
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_gl_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_rl_simple // rocket launcher
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_rl_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_shotgun_simple // shotgun
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_shotgun_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_uzi_simple // machine gun
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_uzi_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_uzi_simple // machine gun
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_uzi_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_campingrifle_simple // sniper rifle
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_campingrifle_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_fireball_simple // fireball
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_fireball_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_hlac_simple // HLAC
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_hlac_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_hookgun_simple // hook gun
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_hookgun_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_laser_simple // laser
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_laser_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_minelayer_simple // minelayer
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_minelayer_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_minstanex_simple // minstanex
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_minstanex_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_porto_simple // portolauncher
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_porto_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_seeker_simple // tag seeker
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_seeker_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_tuba_simple // tuba
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/weapons/g_tuba_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+////////// ARMOR + HEALTH ITEMS //////////
+
+///// ARMOR /////
+
+item_armor_small_simple // 5a
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/item_armor_small_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+item_armor_medium_simple // 25a
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/item_armor_medium_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+item_armor_big_simple // 50a
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/item_armor_big_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+item_armor_large_simple  // 100a
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/item_armor_large_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+///// HEALTH /////
+
+g_h1_simple // 5hp
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_h1_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_h25_simple // 25hp
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_h25_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_h50_simple // 50hp
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_h50_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_h100_simple // 100hp
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_h100_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+////////// POWERUPS //////////
+
+g_strength_simple // strength
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_strength_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_invincible_simple // shield
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_invincible_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_jetpack_simple // jetpack
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_jetpack_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_fuel_simple // fuel for jetpack
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_fuel_simple
+        blendfunc blend
+        nopicmip
+    }
+}
+
+g_fuelregen_simple // fuel regen powerup
+{
+    deformVertexes autosprite
+    cull none
+     {
+        map models/items/g_fuelregen_simple
+        blendfunc blend
+        nopicmip
+    }
+}
\ No newline at end of file

History

#1 Updated by terencehill almost 2 years ago

Ghosted weapon models are now too dark, almost black, not very appealing. Maybe a different cvar to define ghost alpha for models and for simple items?
Also, why health items are white instead of red?

#2 Updated by terencehill almost 2 years ago

About cvar names, I'd prefer cl_weapon_stay_* instead of cl_staywep_*, so that they are similar to the server cvar g_weapon_stay

#3 Updated by terencehill almost 2 years ago

terencehill wrote:

Ghosted weapon models are now too dark, almost black

Sorry, with default settings (cl_ghost_items 0.45) they aren't so much dark, I think it's acceptable.
Thought that setting cl_ghost_items to 1, the default value was loaded, but looking at the code I saw that 0.55 is used instead.

#4 Updated by tZork almost 2 years ago

  • Status changed from New to Resolved
  • Assignee set to tZork

Thanks for the feedback terencehill, i changed those cvar names. Wrt to default alphas and such, this can easily be tweaked later tough the config.
Branch merged.

Also available in: Atom PDF